Skip to content

Commit

Permalink
Fix segfault in event pipe
Browse files Browse the repository at this point in the history
Reported by:	kmoore
  • Loading branch information
bapt committed Dec 12, 2013
1 parent 11cca80 commit ac91e3a
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libpkg/pkg_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ sbuf_json_escape(struct sbuf *buf, const char *str)
static void
pipeevent(struct pkg_event *ev)
{
struct pkg *pkg = NULL;
struct pkg_dep *dep = NULL;
struct sbuf *msg, *buf;
const char *message;
Expand Down Expand Up @@ -225,7 +224,7 @@ pipeevent(struct pkg_event *ev)
ev->e_required.pkg,
ev->e_required.pkg,
ev->e_required.force == 1 ? "true": "false");
while (pkg_rdeps(pkg, &dep) == EPKG_OK)
while (pkg_rdeps(ev->e_required.pkg, &dep) == EPKG_OK)
sbuf_printf(msg, "{ \"pkgname\": \"%s\", "
"\"pkgversion\": \"%s\" }, ",
pkg_dep_name(dep),
Expand Down

0 comments on commit ac91e3a

Please sign in to comment.