Three labels seems a bit excessive here.  This could be simplified to:

error:
    g_free(temp_buf);
    g_free(sca);
    return NULL;
}