sexp: Fix invalid deallocation in error path.
authorPeter Wu <peter@lekensteyn.nl>
Tue, 14 Jul 2015 00:53:38 +0000 (09:53 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Tue, 14 Jul 2015 00:53:38 +0000 (09:53 +0900)
* src/sexp.c: Fix wrong condition.

--

Signed-off-by: Peter Wu <peter@lekensteyn.nl>
src/sexp.c

index 9bc13ca..1c014e0 100644 (file)
@@ -2405,7 +2405,7 @@ _gcry_sexp_vextract_param (gcry_sexp_t sexp, const char *path,
           _gcry_mpi_release (*array[idx]);
           *array[idx] = NULL;
         }
-      else if (!arrayisdesc[idx] == 1)
+      else if (arrayisdesc[idx] == 1)
         {
           /* Caller provided buffer.  */
           gcry_buffer_t *spec = (gcry_buffer_t*)array[idx];