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 | 6346ab79a61be7325fdf3f16ac7f002f8128050c (patch) | |
tree | e8c1e1129e61ab8c9d829859cc8df49a2c1c1386 /source3 | |
parent | e9c2515df0ac92e275da3dcd62de6cc50009bf6e (diff) | |
download | samba-6346ab79a61be7325fdf3f16ac7f002f8128050c.tar.gz samba-6346ab79a61be7325fdf3f16ac7f002f8128050c.tar.bz2 samba-6346ab79a61be7325fdf3f16ac7f002f8128050c.zip |
Fix part of bug #3617 from valgrind trace.
"Invalid read of size 1" errors.
Jeremy.
(This used to be commit d954a4954ba8ed6cb2c6074176a6008cfa398dd7)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/nmbd/nmbd_namelistdb.c | 1 | ||||
-rw-r--r-- | source3/nmbd/nmbd_nameregister.c | 6 |
2 files changed, 4 insertions, 3 deletions
diff --git a/source3/nmbd/nmbd_namelistdb.c b/source3/nmbd/nmbd_namelistdb.c index f9cbcf4f59..6570fd4ec7 100644 --- a/source3/nmbd/nmbd_namelistdb.c +++ b/source3/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/source3/nmbd/nmbd_nameregister.c b/source3/nmbd/nmbd_nameregister.c index edcf258519..98f129aa89 100644 --- a/source3/nmbd/nmbd_nameregister.c +++ b/source3/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. */ |