]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
blkid: fix double free [coverity scan]
authorKarel Zak <kzak@redhat.com>
Wed, 12 Dec 2012 19:48:15 +0000 (20:48 +0100)
committerKarel Zak <kzak@redhat.com>
Wed, 12 Dec 2012 19:48:15 +0000 (20:48 +0100)
Signed-off-by: Karel Zak <kzak@redhat.com>
misc-utils/blkid.c

index fa38d82f6b607728196c4ac2fb4ab8af75add5bb..856eba00dfc1f97b0b6411b97ac3356a5fa73913 100644 (file)
@@ -370,6 +370,7 @@ static int append_str(char **res, size_t *sz, const char *a, const char *b)
        str = realloc(str, len + 1);
        if (!str) {
                free(*res);
+               *res = NULL;
                return -1;
        }