summaryrefslogtreecommitdiff
path: root/source3/nmbd
diff options
context:
space:
mode:
Diffstat (limited to 'source3/nmbd')
-rw-r--r--source3/nmbd/nmbd.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/source3/nmbd/nmbd.c b/source3/nmbd/nmbd.c
index 9c8c764763..b9d78a8ba9 100644
--- a/source3/nmbd/nmbd.c
+++ b/source3/nmbd/nmbd.c
@@ -372,6 +372,7 @@ static void process(void)
while( True ) {
time_t t = time(NULL);
+ TALLOC_CTX *frame = talloc_stackframe();
/* Check for internal messages */
@@ -390,8 +391,10 @@ static void process(void)
* (nmbd_packets.c)
*/
- if(listen_for_packets(run_election))
+ if(listen_for_packets(run_election)) {
+ TALLOC_FREE(frame);
return;
+ }
/*
* Handle termination inband.
@@ -583,18 +586,22 @@ static void process(void)
NULL, MSG_SMB_CONF_UPDATED,
procid_self(), &blob);
- if(no_subnets)
+ if(no_subnets) {
+ TALLOC_FREE(frame);
return;
+ }
reload_after_sighup = 0;
}
/* check for new network interfaces */
- if(reload_interfaces(t))
+ if(reload_interfaces(t)) {
+ TALLOC_FREE(frame);
return;
+ }
/* free up temp memory */
- lp_TALLOC_FREE();
+ TALLOC_FREE(frame);
}
}