Parcourir la source

Close config file on error path

Jouni Malinen il y a 15 ans
Parent
commit
9a8d8b3db5
1 fichiers modifiés avec 1 ajouts et 0 suppressions
  1. 1 0
      hostapd/config_file.c

+ 1 - 0
hostapd/config_file.c

@@ -1155,6 +1155,7 @@ struct hostapd_config * hostapd_config_read(const char *fname)
 	if (conf->driver == NULL) {
 		wpa_printf(MSG_ERROR, "No driver wrappers registered!");
 		hostapd_config_free(conf);
+		fclose(f);
 		return NULL;
 	}