nufw-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nufw-devel] [PATCH 2 of 5] Free all data in g_module_unload()


From: Mikael Berthe
Subject: [Nufw-devel] [PATCH 2 of 5] Free all data in g_module_unload()
Date: Tue, 25 Oct 2005 19:56:04 +0200

# HG changeset patch
# User Mikael Berthe <address@hidden>
# Node ID b0e7c79601ca4bb8a504f873e2a11cd6e43c2d34
# Parent  1d7ba71e8bcc05d8a2ece8c2ba706f0399047305
Free all data in g_module_unload()
(svn revision r842)

diff -r 1d7ba71e8bcc -r b0e7c79601ca src/nuauth/modules/plaintext/plaintext.c
--- a/src/nuauth/modules/plaintext/plaintext.c  Sun Oct 23 19:15:39 2005 +0200
+++ b/src/nuauth/modules/plaintext/plaintext.c  Sun Oct 23 19:15:45 2005 +0200
@@ -681,15 +681,27 @@
           if (p_acl->apps) {
               GSList *p_app = p_acl->apps;
               for ( ; p_app ; p_app = g_slist_next(p_app)) {
+                  // Free AppName string
                   g_free(((struct T_app*)p_app->data)->appname);
+                  // Free MD5 string if there is one
                   if (((struct T_app*)p_app->data)->appmd5)
                       g_free(((struct T_app*)p_app->data)->appmd5);
               }
               g_slist_free(p_acl->apps);
               g_free(p_acl);
           }
-          // FIXME: free IPs
-          // FIXME: free ports
+          // Free Src IPs
+          if (p_acl->src_ip)
+              g_slist_free(p_acl->src_ip);
+          // Free Dst IPs
+          if (p_acl->dst_ip)
+              g_slist_free(p_acl->dst_ip);
+          // Free Src ports
+          if (p_acl->src_ports)
+              g_slist_free(p_acl->src_ports);
+          // Free Dst ports
+          if (p_acl->dst_ports)
+              g_slist_free(p_acl->dst_ports);
       }
       // Now we can free the list
       g_slist_free(plaintext_acllist);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]