Repository : ssh://git@open-mesh.org/alfred
On branch : master
commit 3c2de69b06b5ac6ad1fead0ad7efb79851538d7f Author: Sven Eckelmann sven@narfation.org Date: Wed Oct 17 21:51:07 2012 +0200
alfred: Fix test for failed sendbuf allocation
Signed-off-by: Sven Eckelmann sven@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;