From: Travis Cross Date: Mon, 25 Jun 2012 05:57:01 +0000 (+0000) Subject: Add missing return statement X-Git-Tag: v1.2.0~255 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e6629ab5f606c799aa12204dbc307cba1b3a0648;p=thirdparty%2Ffreeswitch.git Add missing return statement sres_cached_answers_sockaddr is supposed to return ENOENT if no cached records are found. Because of the missing return statement, however, it would never do this and would instead return something very likely to be garbage. --- diff --git a/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c b/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c index ceb7d0f601..009ba80695 100644 --- a/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c +++ b/libs/sofia-sip/libsofia-sip-ua/sresolv/sres.c @@ -1372,7 +1372,7 @@ sres_cached_answers_sockaddr(sres_resolver_t *res, return NULL; if (!sres_cache_get(res->res_cache, type, name, &result)) - su_seterrno(ENOENT), (void *)NULL; + return su_seterrno(ENOENT), (void *)NULL; return result; }