service: Initialize tech_data
authorDaniel Wagner <daniel.wagner@bmw-carit.de>
Fri, 7 Jun 2013 11:41:09 +0000 (13:41 +0200)
committerPatrik Flykt <patrik.flykt@linux.intel.com>
Mon, 10 Jun 2013 06:48:12 +0000 (09:48 +0300)
tech_data is allocated on the stack and is therefore not initilized
with NULL.

src/service.c

index 3d03b2c..5649788 100644 (file)
@@ -3435,7 +3435,7 @@ static void preferred_tech_add_by_type(gpointer data, gpointer user_data)
 static GSequence* preferred_tech_list_get(void)
 {
        unsigned int *tech_array;
-       struct preferred_tech_data tech_data;
+       struct preferred_tech_data tech_data = { 0, };
        int i;
 
        tech_array = connman_setting_get_uint_list("PreferredTechnologies");