forked from osmocom/wireshark
protobuf: close another leak.
Close the directory handle we've opened before returning a failure indication if pbw_load_proto_file() or load_all_files_in_dir() reports a failure.
This commit is contained in:
parent
f1ffe7d421
commit
f0abd29e48
|
@ -1450,11 +1450,13 @@ load_all_files_in_dir(PbwDescriptorPool* pool, const gchar* dir_path)
|
|||
/* Note: pbw_load_proto_file support absolute or relative (to one of search paths) path */
|
||||
if (pbw_load_proto_file(pool, path) != 0) {
|
||||
g_free(path);
|
||||
ws_dir_close(dir);
|
||||
return FALSE;
|
||||
}
|
||||
} else {
|
||||
if (!load_all_files_in_dir(pool, path)) {
|
||||
g_free(path);
|
||||
ws_dir_close(dir);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue