diff --git a/src/conf/networkcommon_conf.c b/src/conf/networkcommon_conf.c index 3f0896d6b2..7b7a851351 100644 --- a/src/conf/networkcommon_conf.c +++ b/src/conf/networkcommon_conf.c @@ -52,6 +52,8 @@ struct _virNetworkRouteDef { void virNetworkRouteDefFree(virNetworkRouteDefPtr def) { + if (!def) + return; VIR_FREE(def->family); VIR_FREE(def); }