Skip to content
Snippets Groups Projects
Commit 5733f64b authored by Mark Spencer's avatar Mark Spencer
Browse files

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
parent a57ad69b
No related branches found
No related tags found
No related merge requests found
...@@ -142,7 +142,9 @@ char *description(void) ...@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment