X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=src%2Fcore%2Fbus-endpoint.c;h=aac540ddee3dbc28951a21109d4777e868a55b12;hp=8d11974db484e81227de2f781d8598b8b1b85b11;hb=79008bddf679a5e0900369950eb346c9fa687107;hpb=bb7dd0b04a6e89674100476eed0bbd05c6a4cbd8 diff --git a/src/core/bus-endpoint.c b/src/core/bus-endpoint.c index 8d11974db..aac540dde 100644 --- a/src/core/bus-endpoint.c +++ b/src/core/bus-endpoint.c @@ -34,8 +34,8 @@ int bus_endpoint_new(BusEndpoint **ep) int bus_endpoint_add_policy(BusEndpoint *ep, const char *name, BusPolicyAccess access) { - _cleanup_free_ BusEndpointPolicy *po; - _cleanup_free_ char *key; + _cleanup_free_ BusEndpointPolicy *po = NULL; + _cleanup_free_ char *key = NULL; int r; assert(ep); @@ -55,7 +55,7 @@ int bus_endpoint_add_policy(BusEndpoint *ep, const char *name, BusPolicyAccess a return 0; } } else { - ep->policy_hash = hashmap_new(string_hash_func, string_compare_func); + ep->policy_hash = hashmap_new(&string_hash_ops); if (!ep->policy_hash) return -ENOMEM; }