summaryrefslogtreecommitdiffstats
path: root/binding/radio_impl_rtlsdr.c
diff options
context:
space:
mode:
Diffstat (limited to 'binding/radio_impl_rtlsdr.c')
-rw-r--r--binding/radio_impl_rtlsdr.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/binding/radio_impl_rtlsdr.c b/binding/radio_impl_rtlsdr.c
index 109d3f3..044da0e 100644
--- a/binding/radio_impl_rtlsdr.c
+++ b/binding/radio_impl_rtlsdr.c
@@ -195,9 +195,8 @@ static int rtlsdr_init(void)
static void rtlsdr_set_output(const char *output)
{
// Save output for later use
- if(helper_output)
- free(helper_output);
- helper_output = strdup(output);
+ free(helper_output);
+ helper_output = output ? strdup(output) : NULL;
}
static uint32_t rtlsdr_get_frequency(void)