]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Check return value if unsetenv().
authorTimo Sirainen <tss@iki.fi>
Fri, 4 Dec 2009 22:53:58 +0000 (16:53 -0600)
committerTimo Sirainen <tss@iki.fi>
Fri, 4 Dec 2009 22:53:58 +0000 (16:53 -0600)
--HG--
branch : HEAD

src/lib/env-util.c

index 6c9548046cf2c8aa7479b1a44f604cbe977be6db..643b0866e062b167025f6cd26ab593d55ea02b58 100644 (file)
@@ -25,7 +25,8 @@ void env_put(const char *env)
 void env_remove(const char *name)
 {
 #ifdef HAVE_UNSETENV
-       unsetenv(name);
+       if (unsetenv(name) < 0)
+               i_fatal("unsetenv(%s) failed: %m", name);
 #else
        extern char **environ;
        unsigned int len;