Add -Iinclude to crypto/ compiles
[openssl.git] / crypto / evp / pmeth_fn.c
index a8b7f2f6d579f271776e3a60c6fe25c224e4abb8..d86110b4e77a12c3da5380c84ebeb6b304fd5f4e 100644 (file)
 
 #include <stdio.h>
 #include <stdlib.h>
-#include "cryptlib.h"
+#include "internal/cryptlib.h"
 #include <openssl/objects.h>
 #include <openssl/evp.h>
-#include "evp_locl.h"
+#include "internal/evp_int.h"
 
 #define M_check_autoarg(ctx, arg, arglen, err) \
         if (ctx->pmeth->flags & EVP_PKEY_FLAG_AUTOARGLEN) \
@@ -315,8 +315,7 @@ int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer)
         return -1;
     }
 
-    if (ctx->peerkey)
-        EVP_PKEY_free(ctx->peerkey);
+    EVP_PKEY_free(ctx->peerkey);
     ctx->peerkey = peer;
 
     ret = ctx->pmeth->ctrl(ctx, EVP_PKEY_CTRL_PEER_KEY, 1, peer);