IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 9860


Ignore:
Timestamp:
Nov 3, 2006, 5:15:43 PM (20 years ago)
Author:
jhoblitt
Message:

check munmap()'s return status

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/types/psMetadataConfig.c

    r9848 r9860  
    1010*  @author Eric Van Alst, MHPCC
    1111*
    12 *  @version $Revision: 1.106 $ $Name: not supported by cvs2svn $
    13 *  @date $Date: 2006-11-04 00:20:09 $
     12*  @version $Revision: 1.107 $ $Name: not supported by cvs2svn $
     13*  @date $Date: 2006-11-04 03:15:43 $
    1414*
    1515*  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
     
    12591259    md = psMetadataConfigParse(md, nFail, (char *)file, overwrite);
    12601260
    1261     munmap(file, (size_t)buf.st_size);
     1261    if (munmap(file, (size_t)buf.st_size) != 0) {
     1262        psError(PS_ERR_IO, true, _("failed to munmap file '%s'"), filename);
     1263        if (close(fd) != 0) {
     1264            // the new error flag is set to false so as not to hide the
     1265            // munmap() error
     1266            psError(PS_ERR_IO, false, _("Failed to close file '%s'."), filename);
     1267            return NULL;
     1268        }
     1269    }
     1270
    12621271    /*
    12631272    if (close(fd) != 0) {
Note: See TracChangeset for help on using the changeset viewer.