Skip to content

Commit b042165

Browse files
committed
Fix:sometimes auto-detect jvm doesn't work
1 parent 913ebe2 commit b042165

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/c/ngx_http_clojure_module.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,7 @@ static ngx_int_t ngx_http_clojure_auto_detect_jvm(ngx_conf_t *cf) {
11871187
p = strrchr(result, '.');
11881188
if (p && (!ngx_strcmp(p, ".so") || !ngx_strcmp(p, ".dll") || !ngx_strcmp(p, ".dylib"))) {
11891189
len = strlen(result);
1190-
mcf->jvm_path.data = ngx_pcalloc(cf->pool, len);
1190+
mcf->jvm_path.data = ngx_pcalloc(cf->pool, len+1);
11911191
strcpy((char*)mcf->jvm_path.data, result);
11921192
mcf->jvm_path.len = len;
11931193
return NGX_OK;

0 commit comments

Comments
 (0)