IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 12170


Ignore:
Timestamp:
Mar 1, 2007, 4:30:21 PM (19 years ago)
Author:
jhoblitt
Message:

fix a segfault in p_psDBFetchResult() when no rows are returned/ yet the rows affected count is > 0

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psLib/src/db/psDB.c

    r12128 r12170  
    1212 *  @author Joshua Hoblitt
    1313 *
    14  *  @version $Revision: 1.136 $ $Name: not supported by cvs2svn $
    15  *  @date $Date: 2007-03-01 03:57:08 $
     14 *  @version $Revision: 1.137 $ $Name: not supported by cvs2svn $
     15 *  @date $Date: 2007-03-02 02:30:21 $
    1616 *
    1717 *  Copyright (C) 2005-2006  Joshua Hoblitt, University of Hawaii
     
    941941        fieldCount = mysql_field_count(dbh->mysql);
    942942
     943        // we're going to exit no matter what after this point
     944        mysql_free_result(result);
     945
    943946        // if field count is zero the query should have returned no data.  If
    944947        // it's non-zero then something bad has happened.
     
    948951            return NULL;
    949952        }
     953
     954        return psArrayAlloc(0);
    950955    }
    951956
Note: See TracChangeset for help on using the changeset viewer.