fixes double-malloc() in tags.c + marks a realloc() problem

Wed, 30 May 2018 11:26:28 +0200

author
Mike Becker <universe@uap-core.de>
date
Wed, 30 May 2018 11:26:28 +0200
changeset 388
0b96ae226838
parent 387
92f8a2a243fc
child 389
fe855ce911f9

fixes double-malloc() in tags.c + marks a realloc() problem

dav/tags.c file | annotate | diff | comparison | revisions
--- a/dav/tags.c	Wed May 30 11:00:37 2018 +0200
+++ b/dav/tags.c	Wed May 30 11:26:28 2018 +0200
@@ -204,7 +204,6 @@
     int colorlen = len - namelen - 1;
     
     DavTag *tag = malloc(sizeof(DavTag));
-    tag = malloc(sizeof(DavTag));
     tag->name = malloc(namelen + 1);
     memcpy(tag->name, name, namelen);
     tag->name[namelen] = 0;

mercurial