Closed nasty memory leak with new API call iso_image_dir_get_node().

Coverity CID 12568.
This commit is contained in:
Thomas Schmitt 2015-10-09 15:40:24 +02:00
parent 0433b7ea75
commit 8f76b59541

View File

@ -666,10 +666,12 @@ int iso_dir_get_node_trunc(IsoDir *dir, int truncate_length,
return ISO_OUT_OF_MEM;
ret = iso_truncate_rr_name(1, truncate_length, trunc, 1);
if (ret < 0)
return ret;
goto ex;
ret = iso_dir_get_node(dir, trunc, node);
if (ret == 0)
return 2;
ret = 2;
ex:;
LIBISO_FREE_MEM(trunc);
return ret;
}