From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: PATCH Re: Crash if zsh exits with zftp module loaded
Date: Sun, 9 Aug 2015 10:07:43 -0700 [thread overview]
Message-ID: <150809100743.ZM7453@torch.brasslantern.com> (raw)
In-Reply-To: <150808213755.ZM18793@torch.brasslantern.com>
On Aug 8, 9:37pm, Bart Schaefer wrote:
}
} This only reproduces with a debugging malloc library that detects the
} double free:
So actually the problem is that the zsh/zftp module can't be loaded,
then unloaded, then loaded again without crashing either at reload or
somewhere else along the way.
diff --git a/Src/Modules/zftp.c b/Src/Modules/zftp.c
index 30f5176..bd51512 100644
--- a/Src/Modules/zftp.c
+++ b/Src/Modules/zftp.c
@@ -3149,9 +3149,11 @@ zftp_cleanup(void)
zfclose(zfsess != cursess);
}
zsfree(lastmsg);
+ lastmsg = NULL;
zfunsetparam("ZFTP_SESSION");
freelinklist(zfsessions, (FreeFunc) freesession);
zfree(zfstatusp, sizeof(int)*zfsesscnt);
+ zfstatusp = NULL;
}
static int
prev parent reply other threads:[~2015-08-09 17:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-08-09 4:37 Bart Schaefer
2015-08-09 17:07 ` Bart Schaefer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=150809100743.ZM7453@torch.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).