mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-04 12:10:15 +01:00
platform: preserve errno in nm_auto_pop_netns
This commit is contained in:
parent
ed299cc860
commit
ccf766f659
1 changed files with 5 additions and 1 deletions
|
|
@ -53,8 +53,12 @@ int nmp_netns_get_fd_mnt (NMPNetns *self);
|
|||
static inline void
|
||||
_nm_auto_pop_netns (NMPNetns **p)
|
||||
{
|
||||
if (*p)
|
||||
if (*p) {
|
||||
int errsv = errno;
|
||||
|
||||
nmp_netns_pop (*p);
|
||||
errno = errsv;
|
||||
}
|
||||
}
|
||||
|
||||
#define nm_auto_pop_netns __attribute__((cleanup(_nm_auto_pop_netns)))
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue