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.
(cherry picked from commit f0abd29e48
)
This commit is contained in:
parent
161e765500
commit
0e6c7c7bb2
|
@ -1144,11 +1144,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