From d67b663e21de64261847c7e68de3ba37883c48b7 Mon Sep 17 00:00:00 2001 From: Bert Vermeulen Date: Tue, 24 Jul 2012 00:50:02 +0200 Subject: [PATCH] sr: chronovu-la8: fix segfault on discovery If the uninitialized value didn't happen to contain 0, and there is no Chronovu LA8 connected, the la8_close() causes a segfault in libftdi. --- hardware/chronovu-la8/api.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hardware/chronovu-la8/api.c b/hardware/chronovu-la8/api.c index 81466917..5b82c3ab 100644 --- a/hardware/chronovu-la8/api.c +++ b/hardware/chronovu-la8/api.c @@ -70,6 +70,7 @@ static int hw_init(const char *devinfo) ctx->done = 0; ctx->block_counter = 0; ctx->divcount = 0; /* 10ns sample period == 100MHz samplerate */ + ctx->usb_pid = 0; /* Allocate memory where we'll store the de-mangled data. */ if (!(ctx->final_buf = g_try_malloc(SDRAM_SIZE))) {