Three more valgrind discoveries:
- readfile.c, version patch for new toolsettings used a malloc, using unitialized variables - despgraph, another malloc changed to calloc - timer code for render ESC: unitialized variable in struct
This commit is contained in:
@@ -666,18 +666,10 @@ DagNode * dag_add_node (DagForest *forest, void * fob)
|
||||
{
|
||||
DagNode *node;
|
||||
|
||||
node = MEM_mallocN(sizeof(DagNode),"DAG node");
|
||||
node = MEM_callocN(sizeof(DagNode),"DAG node");
|
||||
if (node) {
|
||||
node->ob = fob;
|
||||
node->color = DAG_WHITE;
|
||||
node->BFS_dist = 0;
|
||||
node->DFS_dist = 0;
|
||||
node->DFS_dvtm = 0;
|
||||
node->DFS_fntm = 0;
|
||||
node->child = NULL;
|
||||
node->next = NULL;
|
||||
node->first_ancestor = NULL;
|
||||
node->ancestor_count = 0;
|
||||
|
||||
if(ugly_hack_sorry) node->type = GS(((ID *) fob)->name); // sorry, done for pose sorting
|
||||
if (forest->numNodes) {
|
||||
|
||||
@@ -5197,7 +5197,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
|
||||
|
||||
while(sce){
|
||||
if(sce->toolsettings == NULL){
|
||||
sce->toolsettings = MEM_mallocN(sizeof(struct ToolSettings),"Tool Settings Struct");
|
||||
sce->toolsettings = MEM_callocN(sizeof(struct ToolSettings),"Tool Settings Struct");
|
||||
sce->toolsettings->cornertype=0;
|
||||
sce->toolsettings->degr = 90;
|
||||
sce->toolsettings->step = 9;
|
||||
|
||||
@@ -1016,8 +1016,7 @@ static void end_test_break_callback()
|
||||
{
|
||||
struct itimerval tmevalue;
|
||||
|
||||
tmevalue.it_value.tv_sec = 0;
|
||||
tmevalue.it_value.tv_usec = 0;
|
||||
memset(&tmevalue, 0, sizeof(struct itimerval));
|
||||
|
||||
setitimer(ITIMER_REAL, &tmevalue, 0);
|
||||
signal(SIGALRM, SIG_IGN);
|
||||
|
||||
Reference in New Issue
Block a user