diff options
author | Jeremy Allison <jra@samba.org> | 2008-02-29 05:51:09 -0800 |
---|---|---|
committer | Jeremy Allison <jra@samba.org> | 2008-02-29 05:51:09 -0800 |
commit | d954a4954ba8ed6cb2c6074176a6008cfa398dd7 (patch) | |
tree | 93ca2f81d1c26c80b3d89016f9d64fff021c3bfb /source/nmbd | |
parent | ee4810099c2d26a0ebab3c41a95bc6b57921683d (diff) | |
download | samba-d954a4954ba8ed6cb2c6074176a6008cfa398dd7.tar.gz samba-d954a4954ba8ed6cb2c6074176a6008cfa398dd7.tar.xz samba-d954a4954ba8ed6cb2c6074176a6008cfa398dd7.zip |
Fix part of bug #3617 from valgrind trace.
"Invalid read of size 1" errors.
Jeremy.
Diffstat (limited to 'source/nmbd')
-rw-r--r-- | source/nmbd/nmbd_namelistdb.c | 1 | ||||
-rw-r--r-- | source/nmbd/nmbd_nameregister.c | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/source/nmbd/nmbd_namelistdb.c b/source/nmbd/nmbd_namelistdb.c index f9cbcf4f59a..6570fd4ec76 100644 --- a/source/nmbd/nmbd_namelistdb.c +++ b/source/nmbd/nmbd_namelistdb.c @@ -297,7 +297,6 @@ void standard_success_register(struct subnet_record *subrec, ******************************************************************/ void standard_fail_register( struct subnet_record *subrec, - struct response_record *rrec, struct nmb_name *nmbname ) { struct name_record *namerec; diff --git a/source/nmbd/nmbd_nameregister.c b/source/nmbd/nmbd_nameregister.c index edcf258519b..98f129aa892 100644 --- a/source/nmbd/nmbd_nameregister.c +++ b/source/nmbd/nmbd_nameregister.c @@ -152,10 +152,11 @@ static void register_name_response(struct subnet_record *subrec, if( rrec->success_fn) (*(register_name_success_function)rrec->success_fn)(subrec, rrec->userdata, answer_name, nb_flags, ttl, register_ip); } else { + struct nmb_name qname = *question_name; if( rrec->fail_fn) (*(register_name_fail_function)rrec->fail_fn)(subrec, rrec, question_name); /* Remove the name. */ - standard_fail_register( subrec, rrec, question_name); + standard_fail_register( subrec, &qname); } /* Ensure we don't retry. */ @@ -280,10 +281,11 @@ static void register_name_timeout_response(struct subnet_record *subrec, if( rrec->success_fn) (*(register_name_success_function)rrec->success_fn)(subrec, rrec->userdata, question_name, nb_flags, ttl, registered_ip); } else { + struct nmb_name qname = *question_name; if( rrec->fail_fn) (*(register_name_fail_function)rrec->fail_fn)(subrec, rrec, question_name); /* Remove the name. */ - standard_fail_register( subrec, rrec, question_name); + standard_fail_register( subrec, &qname); } /* Ensure we don't retry. */ |