summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Roberts <vieuxtech@gmail.com>2009-02-27 12:40:58 -0800
committerSam Roberts <vieuxtech@gmail.com>2009-02-27 12:40:58 -0800
commit6ecff75150002bf30d61abc7a2244067a63507db (patch)
tree436f2448e5baed2ff8dc8cce1944911f72b4b54c
parentf6a842748d17234124c3790b8b4b7339f612e5c4 (diff)
downloadlibnet-6ecff75150002bf30d61abc7a2244067a63507db.tar.gz
debian patch 06 attempts to free the wrong pointer, and also leaks memory from the inner loop.
-rw-r--r--libnet/src/libnet_pblock.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libnet/src/libnet_pblock.c b/libnet/src/libnet_pblock.c
index ae12db9..5e35aa5 100644
--- a/libnet/src/libnet_pblock.c
+++ b/libnet/src/libnet_pblock.c
@@ -395,7 +395,7 @@ libnet_pblock_coalesce(libnet_t *l, u_int8_t **packet, u_int32_t *size)
if (c == -1)
{
/* err msg set in libnet_do_checksum() */
- return (-1);
+ goto err;
}
}
q = p;
@@ -421,7 +421,7 @@ libnet_pblock_coalesce(libnet_t *l, u_int8_t **packet, u_int32_t *size)
return (1);
err:
- free(packet);
+ free(*packet);
return (-1);
}