mirror of
https://github.com/opnsense/src.git
synced 2026-06-04 22:32:43 -04:00
MAC: improve consistency in error handling
Whenever mac_syncache_init() returns an error, ensure that *label = NULL. This simplifies the error handling by the caller. Reviewed by: rscheff MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D46701
This commit is contained in:
parent
b7b7800043
commit
3f2792166a
1 changed files with 1 additions and 0 deletions
|
|
@ -485,6 +485,7 @@ mac_syncache_init(struct label **label)
|
|||
MAC_POLICY_PERFORM_NOSLEEP(syncache_destroy_label,
|
||||
*label);
|
||||
mac_labelzone_free(*label);
|
||||
*label = NULL;
|
||||
}
|
||||
return (error);
|
||||
} else
|
||||
|
|
|
|||
Loading…
Reference in a new issue