From 989ad44d32c2e77972a966d91f1813b0b929f83b Mon Sep 17 00:00:00 2001 From: todd stecher Date: Mon, 19 Jan 2009 15:09:51 -0800 Subject: Memory leaks and other fixes found by Coverity --- source3/nmbd/nmbd_incomingrequests.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source3/nmbd/nmbd_incomingrequests.c') diff --git a/source3/nmbd/nmbd_incomingrequests.c b/source3/nmbd/nmbd_incomingrequests.c index ebe1948141..63f9a3a45c 100644 --- a/source3/nmbd/nmbd_incomingrequests.c +++ b/source3/nmbd/nmbd_incomingrequests.c @@ -314,14 +314,14 @@ void process_node_status_request(struct subnet_record *subrec, struct packet_str char rdata[MAX_DGRAM_SIZE]; char *countptr, *buf, *bufend, *buf0; int names_added,i; - struct name_record *namerec; + struct name_record *namerec = NULL; pull_ascii_nstring(qname, sizeof(qname), nmb->question.question_name.name); DEBUG(3,("process_node_status_request: status request for name %s from IP %s on \ subnet %s.\n", nmb_namestr(&nmb->question.question_name), inet_ntoa(p->ip), subrec->subnet_name)); - if((namerec = find_name_on_subnet(subrec, &nmb->question.question_name, FIND_SELF_NAME)) == 0) { + if(find_name_on_subnet(subrec, &nmb->question.question_name, FIND_SELF_NAME) == 0) { DEBUG(1,("process_node_status_request: status request for name %s from IP %s on \ subnet %s - name not found.\n", nmb_namestr(&nmb->question.question_name), inet_ntoa(p->ip), subrec->subnet_name)); -- cgit