summaryrefslogtreecommitdiff
path: root/src/irmd/main.c
diff options
context:
space:
mode:
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;
}