Clearly guide how to free user_list from subsession_get_user_list() 04/277604/3
authorHyotaek Shim <hyotaek.shim@samsung.com>
Mon, 11 Jul 2022 04:16:02 +0000 (13:16 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Tue, 12 Jul 2022 01:35:36 +0000 (10:35 +0900)
Change-Id: Ic0cc16a072d9a8d307fd061c2fc06c0e6dd1aafc
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
libsessiond/include/sessiond.h

index 662cec0..032967f 100644 (file)
@@ -166,6 +166,12 @@ int subsession_switch_user(int session_uid, const subsession_user_t next_user, s
  * @retval #SUBSESSION_ERROR_PERMISSION_DENIED Not permitted
  * @retval #SUBSESSION_ERROR_NOT_SUPPORTED Not supported
  * @remarks You must free user_list using free()
+ *
+ *          subsession_user_t *user_list_ptr;
+ *          int user_count;
+ *          ret = subsession_get_user_list(5001, &user_list_ptr, &user_count);
+ *          ...
+ *          free(user_list_ptr);
  */
 int subsession_get_user_list(int session_uid, subsession_user_t **user_list, int *user_count);