Skip to content

Commit 39e8996

Browse files
authored
[asan]: Fix signal handler. (sonic-net#2255)
* Fix compilation for natmgrd signal handler Signed-off-by: Nazarii Hnydyn <[email protected]>
1 parent 62916a1 commit 39e8996

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cfgmgr/natmgrd.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,10 @@ void sigterm_handler(int signo)
7272
{
7373
SWSS_LOG_ENTER();
7474

75+
if (old_sigaction.sa_handler != SIG_IGN && old_sigaction.sa_handler != SIG_DFL) {
76+
old_sigaction.sa_handler(signo);
77+
}
78+
7579
gExit = 1;
7680
}
7781

@@ -109,10 +113,6 @@ void cleanup()
109113
natmgr->cleanupMangleIpTables();
110114
natmgr->cleanupPoolIpTable();
111115
}
112-
113-
if (old_sigaction.sa_handler != SIG_IGN && old_sigaction.sa_handler != SIG_DFL) {
114-
old_sigaction.sa_handler(signo);
115-
}
116116
}
117117

118118
int main(int argc, char **argv)

0 commit comments

Comments
 (0)