Переглянути джерело

outbound: Fix freeing null pointer in destroy function

- Only appears in error cases, e.g. syntax check
Hugh Waite 12 роки тому
батько
коміт
e88af0a02d
1 змінених файлів з 2 додано та 1 видалено
  1. 2 1
      modules/outbound/ob_mod.c

+ 2 - 1
modules/outbound/ob_mod.c

@@ -127,7 +127,8 @@ static int mod_init(void)
 
 
 static void destroy(void)
 static void destroy(void)
 {
 {
-	shm_free(ob_key.s);
+	if (ob_key.s)
+		shm_free(ob_key.s);
 }
 }
 
 
 /* Structure of flow-token
 /* Structure of flow-token