Explorar o código

carrierroute: fix failureroute db_load_description

- safeguarding shm_str_dup call in add_failure_route_rule function
Lucian Balaceanu %!s(int64=9) %!d(string=hai) anos
pai
achega
44fdac69eb
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      modules/carrierroute/cr_rule.c

+ 1 - 1
modules/carrierroute/cr_rule.c

@@ -360,7 +360,7 @@ struct failure_route_rule *add_failure_route_rule(struct failure_route_rule **fr
 	shm_frr->mask = mask;
 	shm_frr->next_domain = next_domain;
 	
-	if (shm_str_dup(&shm_frr->comment, comment) != 0) {
+	if (comment && shm_str_dup(&shm_frr->comment, comment) != 0) {
 		goto mem_error;
 	}