]> git.proxmox.com Git - libgit2.git/blobdiff - src/notes.c
allocations: test for overflow of requested size
[libgit2.git] / src / notes.c
index f44c0bd95e9c201a9d73e5b319d521df289f6b4a..1850e81c7476ad8bcc76553e5726c13b848eac98 100644 (file)
@@ -314,7 +314,7 @@ static int note_new(
 {
        git_note *note = NULL;
 
-       note = (git_note *)git__malloc(sizeof(git_note));
+       note = git__malloc(sizeof(git_note));
        GITERR_CHECK_ALLOC(note);
 
        git_oid_cpy(&note->id, note_oid);