[server] fix pointer NULL check after strdup() - found by Coverity
authorMichael Rash <mbr@cipherdyne.org>
Tue, 14 May 2013 00:41:25 +0000 (20:41 -0400)
committerMichael Rash <mbr@cipherdyne.org>
Tue, 14 May 2013 00:41:25 +0000 (20:41 -0400)
server/incoming_spa.c

index 81e3722..c352e3d 100644 (file)
@@ -188,8 +188,8 @@ get_raw_digest(char **digest, char *pkt_data)
 
     *digest = strdup(tmp_digest);
 
-    if (digest == NULL)
-        return SPA_MSG_ERROR;
+    if (*digest == NULL)
+        return SPA_MSG_ERROR;  /* really a strdup() memory allocation problem */
 
     fko_destroy(ctx);
     ctx = NULL;