[commits] [alfred] master: alfred: Fix test for failed sendbuf allocation (3c2de69)

postmaster at open-mesh.org postmaster at open-mesh.org
Wed Oct 17 22:16:04 CEST 2012


Repository : ssh://git@open-mesh.org/alfred

On branch  : master

>---------------------------------------------------------------

commit 3c2de69b06b5ac6ad1fead0ad7efb79851538d7f
Author: Sven Eckelmann <sven at narfation.org>
Date:   Wed Oct 17 21:51:07 2012 +0200

    alfred: Fix test for failed sendbuf allocation
    
    Signed-off-by: Sven Eckelmann <sven at narfation.org>


>---------------------------------------------------------------

3c2de69b06b5ac6ad1fead0ad7efb79851538d7f
 recv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/recv.c b/recv.c
index dce7e50..8ddf7ab 100644
--- a/recv.c
+++ b/recv.c
@@ -217,7 +217,7 @@ int send_alfred_packet(struct globals *globals, uint8_t *dest, void *buf,
 	char *sendbuf;
 
 	sendbuf = malloc(sizeof(*ethhdr) + length);
-	if (!buf)
+	if (!sendbuf)
 		return -1;
 
 	ethhdr = (struct ethhdr *)sendbuf;



More information about the commits mailing list