Fixed two memory leaks when creating folderitems.
authorAndrej Kacian <ticho@claws-mail.org>
Fri, 9 Sep 2016 23:09:13 +0000 (01:09 +0200)
committerAndrej Kacian <ticho@claws-mail.org>
Fri, 9 Sep 2016 23:13:30 +0000 (01:13 +0200)
commit720b9a5429ea3ddfb5af01400eb67b9d2abac0a2
tree026320667b0e2381c21a99aa1164c7a69ef9b083
parentb274c72a2b5b7b482a48b75bee15d13eecf3d8cd
Fixed two memory leaks when creating folderitems.

The Folderitem's "node" member is set to a new empty
GNode in folder_item_new(), but is later set to
another newly allocated GNode.

This commit removes the extra allocation in one case
(folder_new()), and gets rid of the original GNode
in another case, where avoiding the second allocation
is impossible without completely rewriting the recursive
folderitem appending in folder_get_from_xml().
src/folder.c