1.删除接口CRYPTO_cleanup_all_ex_data()接口调用
2.添加对evhttp头的释放
This commit is contained in:
fengweihao
2018-07-02 16:39:09 +08:00
parent 75cd3bbd23
commit fb554743df
3 changed files with 3 additions and 20 deletions

View File

@@ -596,8 +596,6 @@ X509 *x509_create_cert(char *host, int days)
mkcert(&x509, &pkey, 1024, 0, host, days);
CRYPTO_cleanup_all_ex_data();
EVP_PKEY_free(pkey);
return x509;
@@ -784,7 +782,7 @@ int x509_privatekey_init(EVP_PKEY **key, X509 **root)
goto pkey_free;
}
unsigned char buf[SG_DATA_SIZE * 2],*p;
unsigned char buf[SG_DATA_SIZE],*p;
fp = fopen(key_path, "r");
if (NULL == fp){
mesa_runtime_log(RLOG_LV_FATAL, MODULE_NAME, "Failed to open file(%s)", key_path);
@@ -803,7 +801,7 @@ int x509_privatekey_init(EVP_PKEY **key, X509 **root)
mesa_runtime_log(RLOG_LV_FATAL, MODULE_NAME, "Failed to open file(%s)", cert_path);
goto pkey_free;
}
len = fread(buf, 1, SG_DATA_SIZE * 2, fp);
len = fread(buf, 1, SG_DATA_SIZE, fp);
fclose(fp);
p = buf;
@@ -860,6 +858,7 @@ sample_decode_uri(const char *uri, char *host,
if (vl)
*valid = atoi(vl);
evhttp_clear_headers(&params);
free(decoded_uri);
finish:

View File

@@ -1,10 +1,3 @@
/*
* rt_common.h
* Created by fengweihao
* 30 May, 2018
* Func: System timer control interface
*/
#ifndef __RT_COMMON_H__
#define __RT_COMMON_H__

View File

@@ -1,12 +1,3 @@
/*
* sync.h
* Created by Tsihang <qihang@semptian.com>
* 1 June, 2015
* Func: System startup synchronous operation interface of SPASR
* Personal.Q
*/
#ifndef __SYSTEM_SYNC_H__
#define __SYSTEM_SYNC_H__