When we allocated s but fail to allocate l we need to make sure to free
the first allocation before erroring out.
CID: 1419874
Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com>
Differential Revision: https://phab.enlightenment.org/D11409
Change-Id: I4016c7bab0347519e03345f4bb46d16377479dc4
char **s = malloc(count * sizeof(char*));
if (!s) goto err;
GLint *l = malloc(count * sizeof(GLint));
- if (!l) goto err;
+ if (!l)
+ {
+ free(s);
+ goto err;
+ }
memset(s, 0, count * sizeof(char*));
memset(l, 0, count * sizeof(GLint));