libtnccs: Don't try to load IMCs/IMVs from a file if there is no filename
authorTobias Brunner <tobias@strongswan.org>
Wed, 24 Apr 2013 13:27:31 +0000 (15:27 +0200)
committerTobias Brunner <tobias@strongswan.org>
Mon, 8 Jul 2013 16:49:26 +0000 (18:49 +0200)
src/libtnccs/tnc/tnc.c

index 769b9fa..3a5b845 100644 (file)
@@ -100,6 +100,11 @@ static bool load_imcvs_from_config(char *filename, bool is_imc)
        void *addr;
        char *label;
 
+       if (!filename || !*filename)
+       {
+               return TRUE;
+       }
+
        label = is_imc ? "IMC" : "IMV";
 
        DBG1(DBG_TNC, "loading %ss from '%s'", label, filename);