builtin-apply.c: fix a tiny leak introduced during xmemdupz() conversion.
authorJunio C Hamano <gitster@pobox.com>
Wed, 19 Sep 2007 08:37:50 +0000 (01:37 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 19 Sep 2007 08:54:24 +0000 (01:54 -0700)
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin-apply.c

index 512c9b61429f8344402bbf1120c4e90ccf2e17dd..db337f1aca48d7f7ec8b5e3c4c9230621d346d81 100644 (file)
@@ -291,6 +291,7 @@ static char *find_name(const char *line, char *def, int p_value, int terminate)
                int deflen = strlen(def);
                if (deflen < len && !strncmp(start, def, deflen))
                        return def;
+               free(def);
        }
 
        return xmemdupz(start, len);