diff options
author | Sam Roberts <vieuxtech@gmail.com> | 2009-02-27 12:40:58 -0800 |
---|---|---|
committer | Sam Roberts <vieuxtech@gmail.com> | 2009-02-27 12:40:58 -0800 |
commit | 6ecff75150002bf30d61abc7a2244067a63507db (patch) | |
tree | 436f2448e5baed2ff8dc8cce1944911f72b4b54c | |
parent | f6a842748d17234124c3790b8b4b7339f612e5c4 (diff) | |
download | libnet-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.c | 4 |
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); } |