comparison src/core/ngx_hash.c @ 7541:eb9c7fb796d5

Core: fixed memory leak on error, missed in c3f60d618c17. Found by Coverity (CID 1451664).
author Maxim Dounin <mdounin@mdounin.ru>
date Fri, 19 Jul 2019 17:50:00 +0300
parents c3f60d618c17
children 2a7155733855
comparison
equal deleted inserted replaced
7540:9a970c905045 7541:eb9c7fb796d5
356 if (len > 65536 - ngx_cacheline_size) { 356 if (len > 65536 - ngx_cacheline_size) {
357 ngx_log_error(NGX_LOG_EMERG, hinit->pool->log, 0, 357 ngx_log_error(NGX_LOG_EMERG, hinit->pool->log, 0,
358 "could not build %s, you should " 358 "could not build %s, you should "
359 "increase %s_max_size: %i", 359 "increase %s_max_size: %i",
360 hinit->name, hinit->name, hinit->max_size); 360 hinit->name, hinit->name, hinit->max_size);
361 ngx_free(test);
361 return NGX_ERROR; 362 return NGX_ERROR;
362 } 363 }
363 364
364 test[key] = (u_short) len; 365 test[key] = (u_short) len;
365 } 366 }