* pqRecycleCmdQueueEntry * Push a command queue entry onto the freelist. */
| 1327 | * Push a command queue entry onto the freelist. |
| 1328 | */ |
| 1329 | void |
| 1330 | pqRecycleCmdQueueEntry(PGconn *conn, PGcmdQueueEntry *entry) |
| 1331 | { |
| 1332 | if (entry == NULL) |
| 1333 | return; |
| 1334 | |
| 1335 | /* recyclable entries should not have a follow-on command */ |
| 1336 | Assert(entry->next == NULL); |
| 1337 | |
| 1338 | if (entry->query) |
| 1339 | { |
| 1340 | free(entry->query); |
| 1341 | entry->query = NULL; |
| 1342 | } |
| 1343 | |
| 1344 | entry->next = conn->cmd_queue_recycle; |
| 1345 | conn->cmd_queue_recycle = entry; |
| 1346 | } |
| 1347 | |
| 1348 | |
| 1349 | /* |
no outgoing calls
no test coverage detected