Changeset 2544

Show
Ignore:
Timestamp:
06/01/07 18:16:33 (2 years ago)
Author:
ensc
Message:

deallocate resources symmetrically

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/lib_internal/unify-copy.c

    r2485 r2544  
    146146      copyMem(out_buf, in_buf, buf_size); 
    147147 
     148      munmap(out_buf,                     buf_size); out_buf = 0; 
    148149      munmap(const_cast(void *)(in_buf),  buf_size);  in_buf = 0; 
    149       munmap(out_buf,                     buf_size); out_buf = 0; 
    150150    } 
    151151 
     
    154154 
    155155  out: 
     156  if (out_buf!=0) munmap(out_buf,                     buf_size); 
    156157  if (in_buf !=0) munmap(const_cast(void *)(in_buf),  buf_size); 
    157   if (out_buf!=0) munmap(out_buf,                     buf_size); 
    158158 
    159159  return res;