Skip to content
This repository has been archived by the owner on May 4, 2018. It is now read-only.

Commit

Permalink
unix: fix memory leak in libev
Browse files Browse the repository at this point in the history
Not everything that identifies itself as glibc really is glibc.
  • Loading branch information
bnoordhuis committed Jun 14, 2012
1 parent 4d7f1e1 commit 2c983fb
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions src/unix/ev/ev.c
Expand Up @@ -608,9 +608,6 @@ ev_syserr (const char *msg)
static void *
ev_realloc_emul (void *ptr, long size)
{
#if __GLIBC__
return realloc (ptr, size);
#else
/* some systems, notably openbsd and darwin, fail to properly
* implement realloc (x, 0) (as required by both ansi c-89 and
* the single unix specification, so work around them here.
Expand All @@ -621,7 +618,6 @@ ev_realloc_emul (void *ptr, long size)

free (ptr);
return 0;
#endif
}

static void *(*alloc)(void *ptr, long size) = ev_realloc_emul;
Expand Down

0 comments on commit 2c983fb

Please sign in to comment.