Enlightenment CVS committal

Author  : tsauerbeck
Project : misc
Module  : embrace

Dir     : misc/embrace/src/plugins/sylpheed


Modified Files:
        sylpheed.c 


Log Message:
fixed a memory leak in the sylpheed plugin
===================================================================
RCS file: /cvsroot/enlightenment/misc/embrace/src/plugins/sylpheed/sylpheed.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- sylpheed.c  30 Jan 2005 16:20:25 -0000      1.2
+++ sylpheed.c  30 Jan 2005 17:20:05 -0000      1.3
@@ -1,5 +1,5 @@
 /*
- * $Id: sylpheed.c,v 1.2 2005/01/30 16:20:25 tsauerbeck Exp $
+ * $Id: sylpheed.c,v 1.3 2005/01/30 17:20:05 tsauerbeck Exp $
  *
  * Copyright (C) 2004 Embrace project.
  *
@@ -133,6 +133,7 @@
                xmlNodePtr node;
                xmlChar *ch;
                char xpath[256];
+               int n;
 
                snprintf (xpath, sizeof (xpath),
                          "//folderlist/[EMAIL PROTECTED]'%s\']"
@@ -149,12 +150,16 @@
                assert (node);
 
                ch = xmlNodeListGetString (xml, node, 1);
-               assert (ch);
+               if (ch) {
+                       n = xmlXPathCastStringToNumber (ch);
 
-               if (!i)
-                       mailbox_unseen_set (mb, xmlXPathCastStringToNumber 
(ch));
-               else
-                       mailbox_total_set (mb, xmlXPathCastStringToNumber (ch));
+                       if (!i)
+                               mailbox_unseen_set (mb, n);
+                       else
+                               mailbox_total_set (mb, n);
+
+                       xmlFree (ch);
+               }
 
                xmlXPathFreeObject (set);
        }




-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to