File tree Expand file tree Collapse file tree 3 files changed +26
-30
lines changed
Expand file tree Collapse file tree 3 files changed +26
-30
lines changed Original file line number Diff line number Diff line change @@ -111,8 +111,6 @@ typedef struct
111111 GDestroyNotify enroll_progress_destroy ;
112112} FpEnrollData ;
113113
114- void enroll_data_free (FpEnrollData * enroll_data );
115-
116114typedef struct
117115{
118116 FpPrint * enrolled_print ; /* verify */
@@ -128,7 +126,6 @@ typedef struct
128126 GDestroyNotify match_destroy ;
129127} FpMatchData ;
130128
131- void match_data_free (FpMatchData * match_data );
132129
133130void fpi_device_suspend (FpDevice * device );
134131void fpi_device_resume (FpDevice * device );
Original file line number Diff line number Diff line change @@ -1088,6 +1088,15 @@ fp_device_resume_finish (FpDevice *device,
10881088 return g_task_propagate_boolean (G_TASK (result ), error );
10891089}
10901090
1091+ static void
1092+ enroll_data_free (FpEnrollData * data )
1093+ {
1094+ if (data -> enroll_progress_destroy )
1095+ data -> enroll_progress_destroy (data -> enroll_progress_data );
1096+ data -> enroll_progress_data = NULL ;
1097+ g_clear_object (& data -> print );
1098+ g_free (data );
1099+ }
10911100
10921101/**
10931102 * fp_device_enroll:
@@ -1217,6 +1226,23 @@ fp_device_enroll_finish (FpDevice *device,
12171226 return g_task_propagate_pointer (G_TASK (result ), error );
12181227}
12191228
1229+ static void
1230+ match_data_free (FpMatchData * data )
1231+ {
1232+ g_clear_object (& data -> print );
1233+ g_clear_object (& data -> match );
1234+ g_clear_error (& data -> error );
1235+
1236+ if (data -> match_destroy )
1237+ data -> match_destroy (data -> match_data );
1238+ data -> match_data = NULL ;
1239+
1240+ g_clear_object (& data -> enrolled_print );
1241+ g_clear_pointer (& data -> gallery , g_ptr_array_unref );
1242+
1243+ g_free (data );
1244+ }
1245+
12201246/**
12211247 * fp_device_verify:
12221248 * @device: a #FpDevice
Original file line number Diff line number Diff line change @@ -522,33 +522,6 @@ fpi_device_get_driver_data (FpDevice *device)
522522 return priv -> driver_data ;
523523}
524524
525- void
526- enroll_data_free (FpEnrollData * data )
527- {
528- if (data -> enroll_progress_destroy )
529- data -> enroll_progress_destroy (data -> enroll_progress_data );
530- data -> enroll_progress_data = NULL ;
531- g_clear_object (& data -> print );
532- g_free (data );
533- }
534-
535- void
536- match_data_free (FpMatchData * data )
537- {
538- g_clear_object (& data -> print );
539- g_clear_object (& data -> match );
540- g_clear_error (& data -> error );
541-
542- if (data -> match_destroy )
543- data -> match_destroy (data -> match_data );
544- data -> match_data = NULL ;
545-
546- g_clear_object (& data -> enrolled_print );
547- g_clear_pointer (& data -> gallery , g_ptr_array_unref );
548-
549- g_free (data );
550- }
551-
552525/**
553526 * fpi_device_get_enroll_data:
554527 * @device: The #FpDevice
You can’t perform that action at this time.
0 commit comments