mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-02-20 00:10:09 -05:00
Use memory on stack instead of heap for temporary variables
This commit is contained in:
parent
103217831e
commit
c5e90822d7
1 changed files with 1 additions and 5 deletions
|
|
@ -407,11 +407,7 @@ char *_np_state_generate_key() {
|
|||
char keyname[41];
|
||||
char *p=NULL;
|
||||
|
||||
unsigned char *result = malloc(256 * sizeof(unsigned char));
|
||||
|
||||
if (result == NULL) {
|
||||
die(STATE_UNKNOWN, _("Failed to allocate memory for hashes: %s"), strerror(errno));
|
||||
}
|
||||
unsigned char result[256];
|
||||
|
||||
#ifdef USE_OPENSSL
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue