Skip to content

Commit

Permalink
Report of memory leaks detected in flight plan
Browse files Browse the repository at this point in the history
  • Loading branch information
carlgonz committed May 18, 2018
1 parent 6598555 commit 3ebf434
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/drivers/Linux/data_storage.c
Expand Up @@ -108,6 +108,7 @@ int storage_table_flight_plan_init(int drop)
}
}

//FIXME: memory leak detected
sql = sqlite3_mprintf("CREATE TABLE IF NOT EXISTS %s("
"time int PRIMARY KEY , "
"command text, "
Expand Down Expand Up @@ -274,10 +275,13 @@ int storage_flight_plan_get(int timetodo, char** command, char** args, int** exe
char *err_msg;
int row;
int col;

//FIXME: memory leak detected
char* sql = sqlite3_mprintf("SELECT * FROM %s WHERE time = %d", fp_table, timetodo);


// execute statement
//FIXME: memory leak detected
sqlite3_get_table(db, sql, &results,&row,&col,&err_msg);

if(row==0 || col==0)
Expand Down
2 changes: 1 addition & 1 deletion src/system/taskFlightPlan.c
Expand Up @@ -43,7 +43,7 @@ void taskFlightPlan(void *param)
#endif
//printf("%d\n", (int)elapsed_sec);


//FIXME: memory leak detected
char* command = malloc(sizeof(char)*50);
char* args = malloc(sizeof(char)*50);
int* executions = malloc(sizeof(int));
Expand Down

0 comments on commit 3ebf434

Please sign in to comment.