Closed memory leak with error while creating IsoFile object. Coverity CID 12574.
This commit is contained in:
parent
78d2c02ad8
commit
a6542e5fa9
@ -76,9 +76,12 @@ int default_create_file(IsoNodeBuilder *builder, IsoImage *image,
|
|||||||
if ((int) strlen(name) > image->truncate_length) {
|
if ((int) strlen(name) > image->truncate_length) {
|
||||||
ret = iso_truncate_rr_name(image->truncate_mode,
|
ret = iso_truncate_rr_name(image->truncate_mode,
|
||||||
image->truncate_length, name, 0);
|
image->truncate_length, name, 0);
|
||||||
if (ret < 0)
|
if (ret < 0) {
|
||||||
|
iso_stream_unref(stream);
|
||||||
|
free(name);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
ret = iso_node_new_file(name, stream, &node);
|
ret = iso_node_new_file(name, stream, &node);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
iso_stream_unref(stream);
|
iso_stream_unref(stream);
|
||||||
|
Loading…
Reference in New Issue
Block a user