Free d on failure [CID-103]

This commit is contained in:
Love Hornquist Astrand
2009-07-30 10:45:19 +02:00
parent 403085fdb8
commit e395b3a9ea

View File

@@ -333,8 +333,10 @@ parse_extensions(char *str, HDB_extensions **e)
d = malloc(len);
len = hex_decode(p, d, len);
if (len < 0)
if (len < 0) {
free(d);
return -1;
}
ret = decode_HDB_extension(d, len, &ext, NULL);
free(d);