]> jfr.im git - irc/quakenet/newserv.git/commitdiff
Fix potential null dereference in glinebufwritelog().
authorGunnar Beutner <redacted>
Sat, 8 Feb 2014 07:37:48 +0000 (08:37 +0100)
committerGunnar Beutner <redacted>
Sat, 8 Feb 2014 07:37:48 +0000 (08:37 +0100)
glines/glines_buf.c

index 7053853171bdc98276f26e816d896c0777ff397a..393e1e9888ac25d20c9e5f2a9f9c3ad461ef79dc 100644 (file)
@@ -502,7 +502,7 @@ int glinebufwritelog(glinebuf *gbuf, int propagating) {
   }
 
   /* Make a new glinebuf for the log */
-  if (!gbl && gbuf->id == 0) {
+  if (!gbl) {
     gbl = malloc(sizeof(glinebuf));
     glinebufinit(gbl, (gbuf->id == 0) ? nextglinebufid++ : gbuf->id);