Skip to content

Commit

Permalink
Fix possible memory leak.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco van Wieringen committed Feb 17, 2015
1 parent 696b6cd commit 35855b8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/stored/dir_cmd.c
Expand Up @@ -1645,10 +1645,6 @@ static bool passive_cmd(JCR *jcr)
BSOCK *dir = jcr->dir_bsock;
BSOCK *fd; /* file daemon bsock */

fd = New(BSOCK_TCP);
if (me->nokeepalive) {
fd->clear_keepalive();
}
Dmsg1(100, "PassiveClientCmd: %s", dir->msg);
if (sscanf(dir->msg, passiveclientcmd, filed_addr, &filed_port, &enable_ssl) != 3) {
pm_strcpy(jcr->errmsg, dir->msg);
Expand All @@ -1660,6 +1656,10 @@ static bool passive_cmd(JCR *jcr)

jcr->passive_client = true;

fd = New(BSOCK_TCP);
if (me->nokeepalive) {
fd->clear_keepalive();
}
fd->set_source_address(me->SDsrc_addr);

/*
Expand Down

0 comments on commit 35855b8

Please sign in to comment.