Skip to content

Commit

Permalink
Avoid leaking sqlite3_stmt on errors
Browse files Browse the repository at this point in the history
  • Loading branch information
audun authored and nyalldawson committed May 26, 2020
1 parent 57519e9 commit dc8c3d9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/providers/spatialite/qgsspatialiteprovider.cpp
Expand Up @@ -4362,6 +4362,7 @@ bool QgsSpatiaLiteProvider::deleteFeatures( const QgsFeatureIds &id )
errMsg = ( char * ) sqlite3_malloc( ( int ) strlen( err ) + 1 );
strcpy( errMsg, err );
handleError( sql, errMsg, savepointId );
sqlite3_finalize( stmt );
return false;
}
}
Expand Down Expand Up @@ -4643,6 +4644,7 @@ bool QgsSpatiaLiteProvider::changeGeometryValues( const QgsGeometryMap &geometry
errMsg = ( char * ) sqlite3_malloc( ( int ) strlen( err ) + 1 );
strcpy( errMsg, err );
handleError( sql, errMsg, savepointId );
sqlite3_finalize( stmt );
return false;
}
}
Expand Down

0 comments on commit dc8c3d9

Please sign in to comment.