Bug fix: Freeing wrong pointer in case of memory shortage. Coverty CID 12600.

This commit is contained in:
Thomas Schmitt 2015-10-08 19:52:23 +02:00
parent d427a03192
commit 06ea46c8d5
1 changed files with 1 additions and 1 deletions

View File

@ -5290,7 +5290,7 @@ int iso_report_help(char **doc, char ***result, int *line_count, int flag)
return ISO_OUT_OF_MEM;
buf = calloc(1, count);
if (buf == NULL) {
free(result);
free(*result);
*result = NULL;
return ISO_OUT_OF_MEM;
}