Bug fix: Freeing wrong pointer in case of memory shortage. Coverty CID 12600.
This commit is contained in:
parent
d427a03192
commit
06ea46c8d5
@ -5290,7 +5290,7 @@ int iso_report_help(char **doc, char ***result, int *line_count, int flag)
|
|||||||
return ISO_OUT_OF_MEM;
|
return ISO_OUT_OF_MEM;
|
||||||
buf = calloc(1, count);
|
buf = calloc(1, count);
|
||||||
if (buf == NULL) {
|
if (buf == NULL) {
|
||||||
free(result);
|
free(*result);
|
||||||
*result = NULL;
|
*result = NULL;
|
||||||
return ISO_OUT_OF_MEM;
|
return ISO_OUT_OF_MEM;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user