v1-fix-copy-and-past-thinko-fe-cancel.patch

application/octet-stream

Filename: v1-fix-copy-and-past-thinko-fe-cancel.patch
Type: application/octet-stream
Part: 0
Message: Re: Fix copy-and-past thinko (src/interfaces/libpq/fe-cancel.c)

Patch

Format: unified
Series: patch v1
File+
src/interfaces/libpq/fe-cancel.c 1 1
diff --git a/src/interfaces/libpq/fe-cancel.c b/src/interfaces/libpq/fe-cancel.c
index 8c7c198a53..cd3102346b 100644
--- a/src/interfaces/libpq/fe-cancel.c
+++ b/src/interfaces/libpq/fe-cancel.c
@@ -114,7 +114,7 @@ PQcancelCreate(PGconn *conn)
 	if (conn->be_cancel_key != NULL)
 	{
 		cancelConn->be_cancel_key = malloc(conn->be_cancel_key_len);
-		if (!conn->be_cancel_key)
+		if (cancelConn->be_cancel_key == NULL)
 			goto oom_error;
 		memcpy(cancelConn->be_cancel_key, conn->be_cancel_key, conn->be_cancel_key_len);
 	}