Skip to content

Commit

Permalink
[asan]: Fix signal handler. (sonic-net#2255)
Browse files Browse the repository at this point in the history
* Fix compilation for natmgrd signal handler
Signed-off-by: Nazarii Hnydyn <[email protected]>
  • Loading branch information
nazariig authored May 4, 2022
1 parent 62916a1 commit 39e8996
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cfgmgr/natmgrd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ void sigterm_handler(int signo)
{
SWSS_LOG_ENTER();

if (old_sigaction.sa_handler != SIG_IGN && old_sigaction.sa_handler != SIG_DFL) {
old_sigaction.sa_handler(signo);
}

gExit = 1;
}

Expand Down Expand Up @@ -109,10 +113,6 @@ void cleanup()
natmgr->cleanupMangleIpTables();
natmgr->cleanupPoolIpTable();
}

if (old_sigaction.sa_handler != SIG_IGN && old_sigaction.sa_handler != SIG_DFL) {
old_sigaction.sa_handler(signo);
}
}

int main(int argc, char **argv)
Expand Down

0 comments on commit 39e8996

Please sign in to comment.