We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 71b96e1 commit 5e46f08Copy full SHA for 5e46f08
src/util_uri.c
@@ -81,11 +81,12 @@ struct util_ctx_st {
81
82
UTIL_CTX *UTIL_CTX_new()
83
{
84
- UTIL_CTX *ctx;
+ UTIL_CTX *ctx = OPENSSL_malloc(sizeof(UTIL_CTX));
85
86
- ctx = OPENSSL_malloc(sizeof(UTIL_CTX));
87
- if (ctx)
88
- memset(ctx, 0, sizeof(UTIL_CTX));
+ if (!ctx)
+ return NULL;
+
89
+ memset(ctx, 0, sizeof(UTIL_CTX));
90
pthread_mutex_init(&ctx->lock, 0);
91
return ctx;
92
}
0 commit comments