Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit12a45a2

Browse files
committed
Fix copy-pasto in freeing memory on error in vacuumlo.
It's harmless to call PQfreemem() with a NULL argument, so the onlyconsequence was that if allocating 'schema' failed, but allocating 'table'or 'field' succeeded, we would leak a bit of memory. That's highlyunlikely to happen, so this is just academical, but let's get it right.Per bug #15838 from Timur Birsh. Backpatch back to 9.5, where thePQfreemem() calls were introduced.Discussion:https://www.postgresql.org/message-id/15838-3221652c72c5e69d@postgresql.org
1 parent17aa054 commit12a45a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎contrib/vacuumlo/vacuumlo.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,9 +245,9 @@ vacuumlo(const char *database, const struct _param *param)
245245
PQfinish(conn);
246246
if (schema!=NULL)
247247
PQfreemem(schema);
248-
if (schema!=NULL)
248+
if (table!=NULL)
249249
PQfreemem(table);
250-
if (schema!=NULL)
250+
if (field!=NULL)
251251
PQfreemem(field);
252252
return-1;
253253
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp