File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -900,13 +900,17 @@ GInetFlow *g_inet_flow_get_full(GInetFlowTable * table,
900
900
{
901
901
GInetFlow packet = {.timestamp = timestamp };
902
902
GInetTuple * tuple = NULL ;
903
+ GInetTuple tmp_tuple = { 0 };
903
904
GInetFlow * flow = NULL ;
904
905
905
- tuple = calloc (1 , sizeof (GInetTuple ));
906
-
907
906
if (ret_tuple ) {
907
+ tuple = calloc (1 , sizeof (GInetTuple ));
908
908
* ret_tuple = tuple ;
909
909
}
910
+ else
911
+ {
912
+ tuple = & tmp_tuple ;
913
+ }
910
914
911
915
if (l2 ) {
912
916
if (!flow_parse
@@ -962,11 +966,6 @@ GInetFlow *g_inet_flow_get_full(GInetFlowTable * table,
962
966
flow -> packets ++ ;
963
967
}
964
968
exit :
965
- /* We may need to release the temporary tuple */
966
- if (!ret_tuple ) {
967
- free (tuple );
968
- }
969
-
970
969
return flow ;
971
970
}
972
971
You can’t perform that action at this time.
0 commit comments