NetworkManager r3498 - trunk/libnm-glib



Author: dcbw
Date: Tue Mar 25 11:18:57 2008
New Revision: 3498
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3498&view=rev

Log:
Ensure that zero-length array translates to NULL

Modified:
   trunk/libnm-glib/nm-types.c

Modified: trunk/libnm-glib/nm-types.c
==============================================================================
--- trunk/libnm-glib/nm-types.c	(original)
+++ trunk/libnm-glib/nm-types.c	Tue Mar 25 11:18:57 2008
@@ -241,6 +241,10 @@
 					g_warning ("%s: couldn't create object for %s", __func__, path);
 			}
 		}
+		if (temp->len == 0) {
+			g_ptr_array_free (temp, TRUE);
+			temp = NULL;
+		}
 	}
 
 	/* Deallocate after to ensure that an object that might already



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