Fix some potential memory leaks

This commit is contained in:
Peter Bui
2011-08-08 21:44:39 -04:00
committed by Michael Stapelberg
parent 6fb5d6e313
commit 5e06b1b21d
5 changed files with 11 additions and 3 deletions

View File

@ -1101,6 +1101,7 @@ colorpixel:
char *hex;
if (asprintf(&hex, "#%s", $2) == -1)
die("asprintf()");
free($2);
$$ = get_colorpixel(hex);
free(hex);
}