Fix allocation failure check in walk_rtree
authorGreg Hudson <ghudson@mit.edu>
Thu, 12 Feb 2009 17:51:45 +0000 (17:51 +0000)
committerGreg Hudson <ghudson@mit.edu>
Thu, 12 Feb 2009 17:51:45 +0000 (17:51 +0000)
Check the correct variable for null after allocating the server string
in rtree_capath_vals.

ticket: 6392
tags: pullup
target_version: 1.7

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

src/lib/krb5/krb/walk_rtree.c

index 5577bb9092c10682e2bca9623ac48f701b1197cd..a22f5864ac82e188d5c401d69c026a9288d38b2d 100644 (file)
@@ -273,7 +273,7 @@ rtree_capath_vals(
     memcpy(clientz, client->data, client->length);
 
     serverz = calloc(server->length + 1, 1);
-    if (clientz == NULL) {
+    if (serverz == NULL) {
        retval = ENOMEM;
        goto error;
     }