diff options
author | Dimitri Staessens <[email protected]> | 2021-04-05 11:05:59 +0200 |
---|---|---|
committer | Sander Vrijders <[email protected]> | 2021-04-13 19:26:03 +0200 |
commit | c43dfe6ef88910eeff96c76a424e74a554d11c55 (patch) | |
tree | 2df82de8e41c27afaf17c463f6b18961f97ccb8e /src/irmd/main.c | |
parent | 809e4d1957daa701a3390b0526b125cc263bfe26 (diff) | |
download | ouroboros-c43dfe6ef88910eeff96c76a424e74a554d11c55.tar.gz ouroboros-c43dfe6ef88910eeff96c76a424e74a554d11c55.zip |
irmd: Remove unused variable in prog_table
This removes a program name variable that was not used anymore.
Signed-off-by: Dimitri Staessens <[email protected]>
Signed-off-by: Sander Vrijders <[email protected]>
Diffstat (limited to 'src/irmd/main.c')
-rw-r--r-- | src/irmd/main.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/irmd/main.c b/src/irmd/main.c index 66bad7da..31f244d9 100644 --- a/src/irmd/main.c +++ b/src/irmd/main.c @@ -699,7 +699,6 @@ static int bind_program(char * prog, char ** argv) { char * progs; - char * progn; char ** argv_dup = NULL; int i; char * name_dup = NULL; @@ -719,13 +718,6 @@ static int bind_program(char * prog, return -ENOMEM; } - progn = strdup(name); - if (progn == NULL) { - pthread_rwlock_unlock(&irmd.reg_lock); - free(progs); - return -ENOMEM; - } - if ((flags & BIND_AUTO) && argc) { /* We need to duplicate argv and set argv[0] to prog. */ argv_dup = malloc((argc + 2) * sizeof(*argv_dup)); @@ -739,17 +731,15 @@ static int bind_program(char * prog, "%s to %s.", prog, name); free(progs); - free(progn); return -ENOMEM; } } argv_dup[argc + 1] = NULL; } - e = prog_entry_create(progn, progs, flags, argv_dup); + e = prog_entry_create(progs, flags, argv_dup); if (e == NULL) { pthread_rwlock_unlock(&irmd.reg_lock); free(progs); - free(progn); argvfree(argv_dup); return -ENOMEM; } |