X-Git-Url: http://git.meshlink.io/?a=blobdiff_plain;f=avahi-common%2Fstrlst.c;h=04941b4e9d116fe2d88afcfeb0047c8530cbe433;hb=69af4f4f5a3718d8ed4ff597daf68de87bbb39f3;hp=a7df6c97a8545998d4868b16ae098e56afc5968c;hpb=9b68da84a46cfb4989bee3499278ada856d96758;p=catta diff --git a/avahi-common/strlst.c b/avahi-common/strlst.c index a7df6c9..04941b4 100644 --- a/avahi-common/strlst.c +++ b/avahi-common/strlst.c @@ -477,10 +477,13 @@ uint32_t avahi_string_list_get_service_cookie(AvahiStringList *l) { return AVAHI_SERVICE_COOKIE_INVALID; ret = (uint32_t) strtoll(value, &end, 0); - avahi_free(value); - if (*value && end && *end != 0) + if (*value && end && *end != 0) { + avahi_free(value); return AVAHI_SERVICE_COOKIE_INVALID; + } + avahi_free(value); + return ret; }