kopia lustrzana https://github.com/Hamlib/Hamlib
malloc/realloc success check
git-svn-id: https://hamlib.svn.sourceforge.net/svnroot/hamlib/trunk@2318 7ae35d74-ebe9-4afe-98af-79ac388436b8Hamlib-1.2.7.1
rodzic
7dee1a1c53
commit
222d72e1ad
|
@ -16,7 +16,7 @@
|
||||||
* Hamlib Interface - mem/channel calls
|
* Hamlib Interface - mem/channel calls
|
||||||
* Copyright (c) 2000-2006 by Stephane Fillod
|
* Copyright (c) 2000-2006 by Stephane Fillod
|
||||||
*
|
*
|
||||||
* $Id: mem.c,v 1.11 2006-10-15 00:27:51 aa6e Exp $
|
* $Id: mem.c,v 1.12 2008-04-11 14:43:09 fillods Exp $
|
||||||
*
|
*
|
||||||
* This library is free software; you can redistribute it and/or modify
|
* This library is free software; you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU Library General Public License as
|
* it under the terms of the GNU Library General Public License as
|
||||||
|
@ -215,6 +215,12 @@ static int generic_retr_extl(RIG *rig, const struct confparams *cfp, rig_ptr_t p
|
||||||
el_size+sizeof(struct ext_list));
|
el_size+sizeof(struct ext_list));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!chan->ext_levels) {
|
||||||
|
rig_debug(RIG_DEBUG_ERR, "%s:%d memory allocation error!\n",
|
||||||
|
__FUNCTION__, __LINE__);
|
||||||
|
return -RIG_ENOMEM;
|
||||||
|
}
|
||||||
|
|
||||||
p->token = cfp->token;
|
p->token = cfp->token;
|
||||||
rig_get_ext_level(rig, RIG_VFO_CURR, p->token, &p->val);
|
rig_get_ext_level(rig, RIG_VFO_CURR, p->token, &p->val);
|
||||||
p++;
|
p++;
|
||||||
|
|
Ładowanie…
Reference in New Issue