diff options
author | Jeremy Allison <jra@samba.org> | 2001-10-27 07:17:21 +0000 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2001-10-27 07:17:21 +0000 |
commit | 5a4d22dd66ab782f6161aa5a4162c0e7f1d811fb (patch) | |
tree | ba246af948cdda3930f7f8dafabc3ce633c17e4a | |
parent | e5f8147d02b57198f684c6686dfa497c6732ff44 (diff) | |
download | samba-5a4d22dd66ab782f6161aa5a4162c0e7f1d811fb.tar.gz samba-5a4d22dd66ab782f6161aa5a4162c0e7f1d811fb.tar.xz samba-5a4d22dd66ab782f6161aa5a4162c0e7f1d811fb.zip |
smbd/notify_hash.c: Merged Herb's fix.
lib/debug.c: Fix for potential null pointer access.
Jeremy.
-rw-r--r-- | source/lib/debug.c | 3 | ||||
-rw-r--r-- | source/smbd/notify_hash.c | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/source/lib/debug.c b/source/lib/debug.c index 6524d58ecb3..92b80c8736a 100644 --- a/source/lib/debug.c +++ b/source/lib/debug.c @@ -365,7 +365,8 @@ BOOL reopen_logs( void ) log_overflow = True; DEBUG(0, ("Unable to open new log file %s: %s\n", debugf, strerror(errno))); log_overflow = False; - x_fflush(dbf); + if (dbf) + x_fflush(dbf); ret = False; } else { x_setbuf(new_dbf, NULL); diff --git a/source/smbd/notify_hash.c b/source/smbd/notify_hash.c index a8470102d52..178dcecc823 100644 --- a/source/smbd/notify_hash.c +++ b/source/smbd/notify_hash.c @@ -116,7 +116,7 @@ static BOOL notify_hash(connection_struct *conn, char *path, uint32 flags, if (flags & (FILE_NOTIFY_CHANGE_DIR_NAME|FILE_NOTIFY_CHANGE_FILE_NAME|FILE_NOTIFY_CHANGE_FILE)) { int i; unsigned char tmp_hash[16]; - mdfour(tmp_hash, (const unsigned char *)fname, strlen(fname)); + mdfour(tmp_hash, (unsigned char *)fname, strlen(fname)); for (i=0;i<16;i++) data->name_hash[i] ^= tmp_hash[i]; } @@ -195,7 +195,7 @@ static BOOL hash_check_notify(connection_struct *conn, uint16 vuid, char *path, static void hash_remove_notify(void *datap) { - SAFE_FREE(datap); + free(datap); } /**************************************************************************** |