diff options
| author | Heikki Linnakangas | 2015-01-23 19:27:57 +0000 |
|---|---|---|
| committer | Heikki Linnakangas | 2015-01-23 20:18:21 +0000 |
| commit | 7d715dee47a07202b84ba5f0d9c919fa7e5bb067 (patch) | |
| tree | a958e1da8f6991ec24f233d1c7df2ab44e46ecad /statement.c | |
| parent | 2a38012890d19e22ff11c98b1da11adc9ab027d2 (diff) | |
Fix miscellaneous little issues spotted by Coverity.
A few were real bugs, although highly unlikely ones. Others were false
positives like dead code, but let's be tidy.
Diffstat (limited to 'statement.c')
| -rw-r--r-- | statement.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/statement.c b/statement.c index a141f35..adcbca3 100644 --- a/statement.c +++ b/statement.c @@ -469,10 +469,9 @@ SC_Constructor(ConnectionClass *conn) char SC_Destructor(StatementClass *self) { - CSTR func = "SC_Destrcutor"; + CSTR func = "SC_Destructor"; QResultClass *res = SC_get_Result(self); - if (!self) return FALSE; mylog("SC_Destructor: self=%p, self->result=%p, self->hdbc=%p\n", self, res, self->hdbc); SC_clear_error(self); if (STMT_EXECUTING == self->status) @@ -2772,7 +2771,6 @@ ParseAndDescribeWithLibpq(StatementClass *stmt, const char *plan_name, { CSTR func = "ParseAndDescribeWithLibpq"; ConnectionClass *conn = SC_get_conn(stmt); - Oid *paramTypes = NULL; PGresult *pgres = NULL; int num_p; Int2 num_discard_params; @@ -2904,9 +2902,6 @@ inolog("num_params=%d info=%d\n", stmt->num_params, num_p); } cleanup: - if (paramTypes) - free(paramTypes); - if (pgres) PQclear(pgres); |
