Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix double-free on bad 'open', fixes issue #3

  • Loading branch information...
commit 69ea924a1787aac9833c60dc45243961154bbb7d 1 parent 2a301dd
@Vagabond authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 c_src/syslog_drv.c
  2. BIN  rebar
View
4 c_src/syslog_drv.c
@@ -97,8 +97,10 @@ static void syslogdrv_output(ErlDrvData handle, char *buff, ErlDrvSizeT bufflen)
if (!strcmp("open", operation)) {
int size, type;
- if (d->ident)
+ if (d->ident) {
free(d->ident); /* free old ident string */
+ d->ident = NULL;
+ }
ei_get_type(buff, &index, &type, &size);
if (type == ERL_STRING_EXT) {
View
BIN  rebar
Binary file not shown
Please sign in to comment.
Something went wrong with that request. Please try again.