From: Enrico Scholz Date: Fri, 1 Jun 2007 16:16:33 +0000 (+0000) Subject: deallocate resources symmetrically X-Git-Tag: release-0.30.214~61 X-Git-Url: http://git.linux-vserver.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ecc226e9561d898367910e3183f093c09b7dbb60;p=util-vserver.git deallocate resources symmetrically git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2544 94cd875c-1c1d-0410-91d2-eb244daf1a30 --- diff --git a/lib_internal/unify-copy.c b/lib_internal/unify-copy.c index b879c32..6c26059 100644 --- a/lib_internal/unify-copy.c +++ b/lib_internal/unify-copy.c @@ -145,16 +145,16 @@ copyMMap(int in_fd, int out_fd) TESTSUITE_COPY_CODE; copyMem(out_buf, in_buf, buf_size); - munmap(const_cast(void *)(in_buf), buf_size); in_buf = 0; munmap(out_buf, buf_size); out_buf = 0; + munmap(const_cast(void *)(in_buf), buf_size); in_buf = 0; } res = true; } out: - if (in_buf !=0) munmap(const_cast(void *)(in_buf), buf_size); if (out_buf!=0) munmap(out_buf, buf_size); + if (in_buf !=0) munmap(const_cast(void *)(in_buf), buf_size); return res; }