s3:lib: fix allocation check in messages_ctdbd.c
authorStefan Metzmacher <metze@samba.org>
Wed, 10 Dec 2014 22:00:43 +0000 (23:00 +0100)
committerAmitay Isaacs <amitay@samba.org>
Wed, 17 Dec 2014 08:26:07 +0000 (09:26 +0100)
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
source3/lib/messages_ctdbd.c

index 53aeb1fd057ab62563d09be46a30658670e53178..dbca1038e3105fb7517a1595c4408708e6b826f7 100644 (file)
@@ -113,7 +113,7 @@ static int messaging_ctdb_send(struct server_id src,
        }
 
        buf = talloc_array(talloc_tos(), uint8_t, buflen);
-       if (buflen == NULL) {
+       if (buf == NULL) {
                return ENOMEM;
        }
        iov_buf(iov, iovlen, buf, buflen);