diff options
author | cbdev <cb@cbcdn.com> | 2018-02-18 06:30:23 +0100 |
---|---|---|
committer | cbdev <cb@cbcdn.com> | 2018-02-18 06:30:23 +0100 |
commit | 65ae3ef13b91e625ec75108f2c354943b624b341 (patch) | |
tree | 40bc9a7ded94c300b1f2229e0aa3373584ef1ac0 | |
parent | 3a15da130f8212f9ff7273673c2ce8c3a8bed859 (diff) | |
parent | 28544f9918dade92e27a5d6bd0fb771c91aa5815 (diff) | |
download | midimonster-65ae3ef13b91e625ec75108f2c354943b624b341.tar.gz midimonster-65ae3ef13b91e625ec75108f2c354943b624b341.tar.bz2 midimonster-65ae3ef13b91e625ec75108f2c354943b624b341.zip |
Merge branch 'master' into uinput
-rw-r--r-- | osc.c | 15 |
1 files changed, 9 insertions, 6 deletions
@@ -501,17 +501,20 @@ static int backend_configure_instance(instance* inst, char* option, char* value) } static instance* backend_instance(){ - instance* i = mm_instance(); - osc_instance* data = calloc(1, sizeof(osc_instance)); - data->fd = -1; + instance* inst = mm_instance(); + if(!inst){ + return NULL; + } - if(!i || !data){ + osc_instance* data = calloc(1, sizeof(osc_instance)); + if(!data){ fprintf(stderr, "Failed to allocate memory\n"); return NULL; } - i->impl = data; - return i; + data->fd = -1; + inst->impl = data; + return inst; } static channel* backend_channel(instance* inst, char* spec){ |