diff options
author | minkikim89 <minkikim89@gmail.com> | 2019-08-20 00:40:45 +0900 |
---|---|---|
committer | dormando <dormando@rydia.net> | 2019-08-27 17:44:38 -0700 |
commit | 17354ac36e37cf7f8423ee4a4b82e09d00121a7e (patch) | |
tree | 4b4a834001dcaee458f718ac1f5f52219b8d0120 /testapp.c | |
parent | 1ab043b7c73b473261bb8f223c85ecc188a56a51 (diff) | |
download | memcached-17354ac36e37cf7f8423ee4a4b82e09d00121a7e.tar.gz |
add error handling when calling dup function
Diffstat (limited to 'testapp.c')
-rw-r--r-- | testapp.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -589,6 +589,7 @@ static struct conn *connect_server(const char *hostname, in_port_t port, static enum test_return test_vperror(void) { int rv = 0; int oldstderr = dup(STDERR_FILENO); + assert(oldstderr >= 0); char tmpl[sizeof(TMP_TEMPLATE)+1]; strncpy(tmpl, TMP_TEMPLATE, sizeof(TMP_TEMPLATE)+1); |