In krb5int_dns_init, fix a malloc-returning-null check which could let
authorGreg Hudson <ghudson@mit.edu>
Mon, 13 Apr 2009 17:16:35 +0000 (17:16 +0000)
committerGreg Hudson <ghudson@mit.edu>
Mon, 13 Apr 2009 17:16:35 +0000 (17:16 +0000)
a null result slip past.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@22197 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/os/dnsglue.c

index 7a6583ca0cabd70f139cca5f62d174d96c1bde76..55e1cd9124bc6598204ee7151c2e024163fc7fe6 100644 (file)
@@ -112,7 +112,7 @@ krb5int_dns_init(struct krb5int_dns_state **dsp,
        p = (ds->ansp == NULL)
            ? malloc(nextincr) : realloc(ds->ansp, nextincr);
 
-       if (p == NULL && ds->ansp != NULL) {
+       if (p == NULL) {
            ret = -1;
            goto errout;
        }