diff options
author | Sander Vrijders <sander.vrijders@ugent.be> | 2017-08-30 13:29:18 +0200 |
---|---|---|
committer | Sander Vrijders <sander.vrijders@ugent.be> | 2017-08-30 16:12:09 +0200 |
commit | a770296c7aa15057602a4e4f5c7744ccfc65b8aa (patch) | |
tree | befee04fa22eeb818d8710e44fa6a9b669a01745 /src/ipcpd/local | |
parent | 521f5f0889bf7b56ade00395e0cfc0d4727dada5 (diff) | |
download | ouroboros-a770296c7aa15057602a4e4f5c7744ccfc65b8aa.tar.gz ouroboros-a770296c7aa15057602a4e4f5c7744ccfc65b8aa.zip |
ipcpd: Add check if name was already registered
This adds a check in the shims if a name was already registered, since
it should not return an error.
Diffstat (limited to 'src/ipcpd/local')
-rw-r--r-- | src/ipcpd/local/main.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/src/ipcpd/local/main.c b/src/ipcpd/local/main.c index aab82d25..fb4e312b 100644 --- a/src/ipcpd/local/main.c +++ b/src/ipcpd/local/main.c @@ -150,16 +150,9 @@ static int ipcp_local_bootstrap(const struct ipcp_config * conf) static int ipcp_local_reg(const uint8_t * hash) { - uint8_t * hash_dup = ipcp_hash_dup(hash); - if (hash_dup == NULL) { - log_err("Failed to duplicate hash."); - return -ENOMEM; - } - - if (shim_data_reg_add_entry(local_data.shim_data, hash_dup)) { + if (shim_data_reg_add_entry(local_data.shim_data, hash)) { log_dbg("Failed to add " HASH_FMT " to local registry.", HASH_VAL(hash)); - free(hash_dup); return -1; } |