summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/session.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/core/session.c b/src/core/session.c
index 8934a61a..f3553634 100644
--- a/src/core/session.c
+++ b/src/core/session.c
@@ -110,11 +110,9 @@ static void cmd_upgrade(const char *data)
char *binary;
if (*data == '\0')
- binary = g_strdup(irssi_binary);
- else
- binary = g_find_program_in_path(data);
+ data = irssi_binary;
- if (binary == NULL)
+ if ((binary = g_find_program_in_path(data)) == NULL)
cmd_return_error(CMDERR_PROGRAM_NOT_FOUND);
/* save the session */