summaryrefslogtreecommitdiff
path: root/src/irmd/main.c
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2021-04-05 11:05:59 +0200
committerSander Vrijders <sander@ouroboros.rocks>2021-04-13 19:26:03 +0200
commitc43dfe6ef88910eeff96c76a424e74a554d11c55 (patch)
tree2df82de8e41c27afaf17c463f6b18961f97ccb8e /src/irmd/main.c
parent809e4d1957daa701a3390b0526b125cc263bfe26 (diff)
downloadouroboros-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 <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/irmd/main.c')
-rw-r--r--src/irmd/main.c12
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;
}