conf-parser: fix OOM check

This commit is contained in:
Antonio Alvarez Feijoo
2024-01-30 12:46:24 +00:00
committed by Luca Boccassi
parent 17f3e91e81
commit 0fa25bd5f4
+1 -1
View File
@@ -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);