diff options
Diffstat (limited to 'discover/paths.c')
-rw-r--r-- | discover/paths.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/discover/paths.c b/discover/paths.c index 0d414eb..c25671b 100644 --- a/discover/paths.c +++ b/discover/paths.c @@ -220,15 +220,16 @@ static enum tftp_type check_tftp_type(void *ctx) const char *argv[] = { pb_system_apps.tftp, "-V", NULL }; struct process *process; enum tftp_type type; + int rc; process = process_create(ctx); process->path = pb_system_apps.tftp; process->argv = argv; process->keep_stdout = true; process->add_stderr = true; - process_run_sync(process); + rc = process_run_sync(process); - if (!process->stdout_buf || process->stdout_len == 0) { + if (rc || !process->stdout_buf || process->stdout_len == 0) { pb_log("Can't check TFTP client type!\n"); type = TFTP_TYPE_BROKEN; |