diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-12-08 19:28:41 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-12-08 19:28:41 +0100 |
commit | 718a400d599f3df3a64c2c0659a48fb9d22b6105 (patch) | |
tree | 48041ab3edec8580781fc37c201f6fb7e6794d51 /src/libmdsserver/client-list.c | |
parent | no more goto fail (diff) | |
download | mds-718a400d599f3df3a64c2c0659a48fb9d22b6105.tar.gz mds-718a400d599f3df3a64c2c0659a48fb9d22b6105.tar.bz2 mds-718a400d599f3df3a64c2c0659a48fb9d22b6105.tar.xz |
m + make sure we never lose errno
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to '')
-rw-r--r-- | src/libmdsserver/client-list.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/libmdsserver/client-list.c b/src/libmdsserver/client-list.c index 5562747..1bcaa72 100644 --- a/src/libmdsserver/client-list.c +++ b/src/libmdsserver/client-list.c @@ -101,6 +101,7 @@ int client_list_clone(const client_list_t* restrict this, client_list_t* restric { size_t n = this->capacity * sizeof(uint64_t); uint64_t* restrict new_clients = NULL; + int saved_errno; out->clients = NULL; @@ -116,8 +117,9 @@ int client_list_clone(const client_list_t* restrict this, client_list_t* restric return 0; pfail: + saved_errno = errno; free(new_clients); - return -1; + return errno = saved_errno, -1; } |