Only Call PQfinish if conn isn't NULL (bug #2162)

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@3528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Mark Spencer
2004-07-28 18:42:35 +00:00
parent a57ad69b53
commit 5733f64bdd

View File

@@ -142,7 +142,9 @@ char *description(void)
static int my_unload_module(void)
{
if (conn)
PQfinish(conn);
conn = NULL;
connected = 0;
if (pghostname && hostname_alloc) {
free(pghostname);