mirror of
https://github.com/asterisk/asterisk.git
synced 2025-09-05 20:20:07 +00:00
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:
@@ -142,7 +142,9 @@ char *description(void)
|
|||||||
|
|
||||||
static int my_unload_module(void)
|
static int my_unload_module(void)
|
||||||
{
|
{
|
||||||
PQfinish(conn);
|
if (conn)
|
||||||
|
PQfinish(conn);
|
||||||
|
conn = NULL;
|
||||||
connected = 0;
|
connected = 0;
|
||||||
if (pghostname && hostname_alloc) {
|
if (pghostname && hostname_alloc) {
|
||||||
free(pghostname);
|
free(pghostname);
|
||||||
|
Reference in New Issue
Block a user