Return NULL rather than an invalid pointer on failure
authorJennifer Richards <jennifer@painless-security.com>
Fri, 1 Jun 2018 19:02:17 +0000 (15:02 -0400)
committerJennifer Richards <jennifer@painless-security.com>
Fri, 1 Jun 2018 19:02:17 +0000 (15:02 -0400)
mon/mons.c

index b47f30a..1df11f2 100644 (file)
@@ -146,6 +146,7 @@ static TR_GSS_RC mons_req_cb(TALLOC_CTX *mem_ctx, TR_MSG *req_msg, TR_MSG **resp
   if (resp == NULL) {
     /* error processing the request */
     /* TODO send back an error */
+    *resp_msg = NULL; /* null this out so the caller doesn't mistake it for valid */
     goto cleanup;
   }