diff --git a/ts7400/ts7400.c b/ts7400/ts7400.c index 5a605c274..dbabb3591 100644 --- a/ts7400/ts7400.c +++ b/ts7400/ts7400.c @@ -53,17 +53,18 @@ static int ts7400_rot_init(ROT *rot) { struct ts7400_rot_priv_data *priv; - priv = (struct ts7400_rot_priv_data *) + rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); + + rot->state.priv = (struct ts7400_rot_priv_data *) malloc(sizeof(struct ts7400_rot_priv_data)); - if (!priv) + if (!rot->state.priv) { return -RIG_ENOMEM; } - rot->state.priv = (void *)priv; + priv = rot->state.priv; - rig_debug(RIG_DEBUG_VERBOSE, "%s called\n", __func__); rot->state.rotport.type.rig = RIG_PORT_NONE; priv->az = priv->el = 0;