Fixed null pointer dereference.
authorArmin Novak <armin.novak@gmail.com>
Sun, 16 Nov 2014 23:50:15 +0000 (00:50 +0100)
committerArmin Novak <armin.novak@gmail.com>
Sun, 16 Nov 2014 23:50:15 +0000 (00:50 +0100)
winpr/libwinpr/utils/wlog/wlog.c

index f0c181a..e55d538 100644 (file)
@@ -647,6 +647,9 @@ int WLog_AddChild(wLog* parent, wLog* child)
                }
        }
 
+       if (!parent->Children)
+               return -1;
+
        parent->Children[parent->ChildrenCount++] = child;
        child->Parent = parent;
        return 0;