]> git.sur5r.net Git - bacula/bacula/commitdiff
Change accurate CurFile allocation size
authorEric Bollengier <eric@eb.homelinux.org>
Sun, 23 Jan 2011 16:23:13 +0000 (17:23 +0100)
committerEric Bollengier <eric@eb.homelinux.org>
Sun, 23 Jan 2011 16:32:31 +0000 (17:32 +0100)
The given length counts already the 3 \0

bacula/src/filed/accurate.c

index 9883bf24efb427269ead22121e57b6f641b8ec48..a0fddc579b703cf3fcb6b73944006b905a80182c 100644 (file)
@@ -207,8 +207,7 @@ static bool accurate_add_file(JCR *jcr, uint32_t len,
    CurFile *item;
 
    /* we store CurFile, fname and ctime/mtime in the same chunk */
-   /* TODO: see if len contains already the 3 \0 */
-   item = (CurFile *)jcr->file_list->hash_malloc(sizeof(CurFile)+len+3);
+   item = (CurFile *)jcr->file_list->hash_malloc(sizeof(CurFile)+len);
    item->seen = 0;
 
    /* TODO: see if we can optimize this part with memcpy instead of strcpy */