Index: mac_portacl.c =================================================================== --- mac_portacl.c (wersja 188919) +++ mac_portacl.c (kopia robocza) @@ -341,10 +341,12 @@ int error; new_string = NULL; - if (req->newptr == NULL) { + if (req->newptr != NULL) { new_string = malloc(MAC_RULE_STRING_LEN, M_PORTACL, M_WAITOK | M_ZERO); + mtx_lock(&rule_mtx); strcpy(new_string, rule_string); + mtx_unlock(&rule_mtx); string = new_string; } else string = rule_string;