Browse code

core: sr module - check for null to avoid free warning

Daniel-Constantin Mierla authored on 15/02/2021 09:39:56
Showing 1 changed files
... ...
@@ -509,7 +509,7 @@ int ksr_locate_module(char *mod_path, char **new_path)
509 509
 	return 0;
510 510
 
511 511
 error:
512
-	if(path!=mod_path) {
512
+	if(path!=NULL && path!=mod_path) {
513 513
 		pkg_free(path);
514 514
 	}
515 515