link-mso19: fixed segmentation fault.

This commit is contained in:
Renato Caldas 2012-01-05 23:37:54 +00:00 committed by Uwe Hermann
parent e42ef08dba
commit d88b939324
1 changed files with 1 additions and 1 deletions

View File

@ -449,7 +449,6 @@ static int hw_init(const char *deviceinfo)
strncpy(product, iProduct, s);
product[s] = 0;
strcpy(manufacturer, iProduct + s);
sprintf(hwrev, "r%d", mso->hwrev);
if (!(mso = g_try_malloc0(sizeof(struct mso)))) {
sr_err("mso19: %s: mso malloc failed", __func__);
@ -460,6 +459,7 @@ static int hw_init(const char *deviceinfo)
sr_warn("Invalid iSerial: %s", iSerial);
goto err_free_mso;
}
sprintf(hwrev, "r%d", mso->hwrev);
/* hardware initial state */
mso->ctlbase = 0;