summaryrefslogtreecommitdiff
path: root/common/src/tfe_future.cpp
diff options
context:
space:
mode:
author崔一鸣 <[email protected]>2018-09-07 17:42:57 +0800
committer崔一鸣 <[email protected]>2018-09-07 17:49:15 +0800
commitb5a937bad68eea51e0741dfd3275fe10cc2d02bd (patch)
treeda10667403513d655ab2cc90a1d52f5f3b2fbb8f /common/src/tfe_future.cpp
parentb6a225078601fea5661b358155e678e6eb045b80 (diff)
fix memory leak bugs
Diffstat (limited to 'common/src/tfe_future.cpp')
-rw-r--r--common/src/tfe_future.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/src/tfe_future.cpp b/common/src/tfe_future.cpp
index 1a15624..f89e6a5 100644
--- a/common/src/tfe_future.cpp
+++ b/common/src/tfe_future.cpp
@@ -25,7 +25,7 @@ struct _future_promise_debug
int fsid_latency;
int fsid_failed;
long long succ_times;
- struct timespec create_time;
+ struct timespec create_time;
};
struct future
{
@@ -52,7 +52,7 @@ void future_promise_library_init(void)
{
return;
}
-
+
int value=0;
memset(&g_FP_instance,0,sizeof(g_FP_instance));
MESA_htable_handle htable = MESA_htable_born();
@@ -90,7 +90,7 @@ void future_promise_library_init(void)
}
struct promise * future_to_promise(struct future * f)
-{
+{
return (struct promise *) f;
}
struct field_get_set_args
@@ -116,7 +116,7 @@ static long field_get_set_cb(void * data, const uchar * key, uint size, void * u
field_id[1]=FS_register(args->fs_handle, FS_STYLE_FIELD, FS_CALC_SPEED,buff);
args->fsid_failed=field_id[1];
ret = MESA_htable_add(args->htable, key, size, (void*)field_id);
- assert(ret>=0);
+ assert(ret>=0);
}
else
{
@@ -134,7 +134,7 @@ struct future * future_create(const char* symbol, future_success_cb * cb_success
p->f.cb_success = cb_success;
p->f.cb_failed = cb_failed;
strncpy(p->f.symbol,symbol,sizeof(p->f.symbol));
-
+
clock_gettime(CLOCK_MONOTONIC,&p->debug.create_time);
long cb_ret=0;
struct field_get_set_args args={.htable = g_FP_instance.name_table, .fs_handle = g_FP_instance.fs_handle};