Changeset baa98ed1b2d238f912d8e21d4f6cdba3b1af1aa5
- Timestamp:
- 03/17/08 15:07:37
(5 years ago)
- Author:
- Theo Schlossnagle <jesus@omniti.com>
- git-committer:
- Theo Schlossnagle <jesus@omniti.com> 1205766457 +0000
- git-parent:
[4b96846179a35015ac0b22d5fe9e9f92480f06a5]
- git-author:
- Theo Schlossnagle <jesus@omniti.com> 1205766457 +0000
- Message:
free leaking memory
-
Files:
-
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
| r2471771 |
rbaa98ed |
|
| 67 | 67 | next = q->head; |
|---|
| 68 | 68 | q->head = q->head->next; |
|---|
| | 69 | free_params(next); |
|---|
| 69 | 70 | if(next->data) free(next->data); |
|---|
| 70 | 71 | free(next); |
|---|
| … | … | |
| 113 | 114 | if(!strcmp(d->paramValues[d->nparams], "[[null]]")) { \ |
|---|
| 114 | 115 | free(d->paramValues[d->nparams]); \ |
|---|
| | 116 | d->paramValues[d->nparams] = NULL; \ |
|---|
| 115 | 117 | d->paramLengths[d->nparams] = 0; \ |
|---|
| 116 | 118 | d->paramAllocd[d->nparams] = 0; \ |
|---|
| … | … | |
| 119 | 121 | } while(0) |
|---|
| 120 | 122 | |
|---|
| | 123 | static void |
|---|
| | 124 | free_params(ds_job_detail *d) { |
|---|
| | 125 | int i; |
|---|
| | 126 | for(i=0; i<d->nparams; i++) |
|---|
| | 127 | if(d->paramAllocd[i] && d->paramValues[i]) |
|---|
| | 128 | free(d->paramValues[i]); |
|---|
| | 129 | } |
|---|
| 121 | 130 | execute_outcome_t |
|---|
| 122 | 131 | stratcon_datastore_execute(conn_q *cq, struct sockaddr *r, ds_job_detail *d) { |
|---|
| … | … | |
| 258 | 267 | stratcon_datastore_savepoint_op(conn_q *cq, const char *p, |
|---|
| 259 | 268 | const char *name) { |
|---|
| 260 | | int rv; |
|---|
| | 269 | int rv = -1; |
|---|
| 261 | 270 | PGresult *res; |
|---|
| 262 | 271 | char cmd[128]; |
|---|