#248 Avoid uninitialized free when allocating buffers
Merged 4 years ago by rharwood. Opened 4 years ago by rharwood.
rharwood/gssproxy weirdfree  into  master

file modified
+2 -1
@@ -300,6 +300,7 @@ 

                           &data_in,

                           &enc_handle);

      if (ret) {

+         free(enc_handle.ciphertext.data);

          ret = EINVAL;

          goto done;

      }
@@ -308,12 +309,12 @@ 

                                 enc_handle.ciphertext.data,

                                 out);

      if (ret) {

+         free(enc_handle.ciphertext.data);

          goto done;

      }

  

  done:

      free(padded);

-     free(enc_handle.ciphertext.data);

      return ret;

  }

  

Sigh, will we ever stop adding bugs in here :-)
LGTM.

Commit eafa3c9 fixes this pull-request

Pull-Request has been merged by rharwood

4 years ago