conf-parser: fix OOM check
This commit is contained in:
committed by
Luca Boccassi
parent
17f3e91e81
commit
0fa25bd5f4
@@ -466,7 +466,7 @@ int hashmap_put_stats_by_path(Hashmap **stats_by_path, const char *path, const s
|
||||
return -ENOMEM;
|
||||
|
||||
path_copy = strdup(path);
|
||||
if (!path)
|
||||
if (!path_copy)
|
||||
return -ENOMEM;
|
||||
|
||||
r = hashmap_put(*stats_by_path, path_copy, st_copy);
|
||||
|
||||
Reference in New Issue
Block a user