diff options
author | Andrew Tridgell <tridge@samba.org> | 1998-08-30 04:27:26 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 1998-08-30 04:27:26 +0000 |
commit | 1778debff146423e3543d40c2fe8413a34888a27 (patch) | |
tree | 41119cab58d30a359cd0082ddf3a3ab86e93932b /source3/nmbd/nmbd_incomingrequests.c | |
parent | 48514704c2825bcde8bed3b92255ba2abcb955b4 (diff) | |
download | samba-1778debff146423e3543d40c2fe8413a34888a27.tar.gz samba-1778debff146423e3543d40c2fe8413a34888a27.tar.bz2 samba-1778debff146423e3543d40c2fe8413a34888a27.zip |
added some defensive programming to nmbd. This mostly means zeroing
areas of memory before freeing them.
While doing this I also found a couple of real bugs. In two places we
were freeing some memory that came from the stack, which leads to
a certain core dump on many sytems.
(This used to be commit c5e5c25c854e54f59291057ba47c4701b5910ebe)
Diffstat (limited to 'source3/nmbd/nmbd_incomingrequests.c')
-rw-r--r-- | source3/nmbd/nmbd_incomingrequests.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/nmbd/nmbd_incomingrequests.c b/source3/nmbd/nmbd_incomingrequests.c index a3afbe827a..c2b8be212f 100644 --- a/source3/nmbd/nmbd_incomingrequests.c +++ b/source3/nmbd/nmbd_incomingrequests.c @@ -576,7 +576,7 @@ on the same subnet (%s) as the requestor. Not replying.\n", if (!success && bcast) { if((prdata != rdata) && (prdata != NULL)) - free(rdata); + free(prdata); return; /* Never reply with a negative response to broadcasts. */ } @@ -589,7 +589,7 @@ on the same subnet (%s) as the requestor. Not replying.\n", if(!success && !bcast && nmb->header.nm_flags.recursion_desired) { if((prdata != rdata) && (prdata != NULL)) - free(rdata); + free(prdata); return; } |