Free correct buffer.
This commit is contained in:
		| @@ -345,7 +345,7 @@ int32_t ipc_OpenSecretStore | |||||||
| 	if(gpReplyBuf) | 	if(gpReplyBuf) | ||||||
| 	{ | 	{ | ||||||
| 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | ||||||
| 		free(gpReqBuf); | 		free(gpReplyBuf); | ||||||
|   } |   } | ||||||
|  |  | ||||||
| 	return retCode; // map the return code from sockReturn | 	return retCode; // map the return code from sockReturn | ||||||
| @@ -452,7 +452,7 @@ int32_t ipc_CloseSecretStore | |||||||
| 	if(gpReplyBuf) | 	if(gpReplyBuf) | ||||||
| 	{ | 	{ | ||||||
| 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | ||||||
| 		free(gpReqBuf); | 		free(gpReplyBuf); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   return retCode; // map return code |   return retCode; // map return code | ||||||
| @@ -550,7 +550,7 @@ int32_t ipc_RemoveSecretStore | |||||||
| 	if(gpReplyBuf) | 	if(gpReplyBuf) | ||||||
| 	{ | 	{ | ||||||
| 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | ||||||
| 		free(gpReqBuf); | 		free(gpReplyBuf); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   return retCode; |   return retCode; | ||||||
| @@ -754,7 +754,7 @@ int32_t ipc_EnumerateKeychainIDs | |||||||
| 	if(gpReplyBuf) | 	if(gpReplyBuf) | ||||||
| 	{ | 	{ | ||||||
| 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | ||||||
| 		free(gpReqBuf); | 		free(gpReplyBuf); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  return retCode; |  return retCode; | ||||||
| @@ -874,7 +874,7 @@ int32_t ipc_AddKeychain | |||||||
| 	if(gpReplyBuf) | 	if(gpReplyBuf) | ||||||
| 	{ | 	{ | ||||||
| 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | ||||||
| 		free(gpReqBuf); | 		free(gpReplyBuf); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   return retCode; |   return retCode; | ||||||
| @@ -985,7 +985,7 @@ int32_t ipc_RemoveKeychain | |||||||
| 	if(gpReplyBuf) | 	if(gpReplyBuf) | ||||||
| 	{ | 	{ | ||||||
| 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | ||||||
| 		free(gpReqBuf); | 		free(gpReplyBuf); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   return retCode; |   return retCode; | ||||||
| @@ -1201,7 +1201,7 @@ int32_t ipc_EnumerateSecretIDs | |||||||
| 	if(gpReplyBuf) | 	if(gpReplyBuf) | ||||||
| 	{ | 	{ | ||||||
| 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | ||||||
| 		free(gpReqBuf); | 		free(gpReplyBuf); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   return retCode; |   return retCode; | ||||||
| @@ -1446,7 +1446,7 @@ int32_t ipc_ReadSecret | |||||||
| 	if(gpReplyBuf) | 	if(gpReplyBuf) | ||||||
| 	{ | 	{ | ||||||
| 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | ||||||
| 		free(gpReqBuf); | 		free(gpReplyBuf); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   return retCode; |   return retCode; | ||||||
| @@ -1680,7 +1680,7 @@ int ipc_WriteSecret | |||||||
| 	if(gpReplyBuf) | 	if(gpReplyBuf) | ||||||
| 	{ | 	{ | ||||||
| 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | ||||||
| 		free(gpReqBuf); | 		free(gpReplyBuf); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   return retCode; |   return retCode; | ||||||
| @@ -1876,7 +1876,7 @@ int32_t ipc_RemoveSecret | |||||||
| 	if(gpReplyBuf) | 	if(gpReplyBuf) | ||||||
| 	{ | 	{ | ||||||
| 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | ||||||
| 		free(gpReqBuf); | 		free(gpReplyBuf); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   return retCode; |   return retCode; | ||||||
| @@ -1996,7 +1996,7 @@ int32_t  ipc_GetSecretStoreInfo | |||||||
| 	if(gpReplyBuf) | 	if(gpReplyBuf) | ||||||
| 	{ | 	{ | ||||||
| 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | ||||||
| 		free(gpReqBuf); | 		free(gpReplyBuf); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   return retCode; // map return code |   return retCode; // map return code | ||||||
| @@ -2123,7 +2123,7 @@ int32_t  ipc_GetKeychainInfo | |||||||
| 	if(gpReplyBuf) | 	if(gpReplyBuf) | ||||||
| 	{ | 	{ | ||||||
| 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | ||||||
| 		free(gpReqBuf); | 		free(gpReplyBuf); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   return retCode;  |   return retCode;  | ||||||
| @@ -2227,7 +2227,7 @@ int32_t  ipc_LockCache | |||||||
| 	if(gpReplyBuf) | 	if(gpReplyBuf) | ||||||
| 	{ | 	{ | ||||||
| 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | ||||||
| 		free(gpReqBuf); | 		free(gpReplyBuf); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   return retCode; // map return code |   return retCode; // map return code | ||||||
| @@ -2330,7 +2330,7 @@ int32_t ipc_UnlockCache | |||||||
| 	if(gpReplyBuf) | 	if(gpReplyBuf) | ||||||
| 	{ | 	{ | ||||||
| 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | ||||||
| 		free(gpReqBuf); | 		free(gpReplyBuf); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   return retCode; // map return code |   return retCode; // map return code | ||||||
| @@ -2451,7 +2451,7 @@ int32_t ipc_SetMasterPasscode | |||||||
| 	if(gpReplyBuf) | 	if(gpReplyBuf) | ||||||
| 	{ | 	{ | ||||||
| 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | ||||||
| 		free(gpReqBuf); | 		free(gpReplyBuf); | ||||||
|   } |   } | ||||||
|    |    | ||||||
|   return retCode; |   return retCode; | ||||||
| @@ -2663,7 +2663,7 @@ int32_t ipc_RemoveKey | |||||||
| 	if(gpReplyBuf) | 	if(gpReplyBuf) | ||||||
| 	{ | 	{ | ||||||
| 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | ||||||
| 		free(gpReqBuf); | 		free(gpReplyBuf); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   return retCode; |   return retCode; | ||||||
| @@ -2920,7 +2920,7 @@ int32_t ipc_ReadKey | |||||||
| 	if(gpReplyBuf) | 	if(gpReplyBuf) | ||||||
| 	{ | 	{ | ||||||
| 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | ||||||
| 		free(gpReqBuf); | 		free(gpReplyBuf); | ||||||
|   } |   } | ||||||
|    |    | ||||||
|   return retCode; |   return retCode; | ||||||
| @@ -3169,7 +3169,7 @@ int32_t ipc_ReadBinaryKey | |||||||
| 	if(gpReplyBuf) | 	if(gpReplyBuf) | ||||||
| 	{ | 	{ | ||||||
| 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | ||||||
| 		free(gpReqBuf); | 		free(gpReplyBuf); | ||||||
|   } |   } | ||||||
|    |    | ||||||
|   return retCode; |   return retCode; | ||||||
| @@ -3417,7 +3417,7 @@ int ipc_WriteKey | |||||||
| 	if(gpReplyBuf) | 	if(gpReplyBuf) | ||||||
| 	{ | 	{ | ||||||
| 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | ||||||
| 		free(gpReqBuf); | 		free(gpReplyBuf); | ||||||
|   } |   } | ||||||
|    |    | ||||||
|   return retCode; |   return retCode; | ||||||
| @@ -3666,7 +3666,7 @@ int ipc_WriteBinaryKey | |||||||
| 	if(gpReplyBuf) | 	if(gpReplyBuf) | ||||||
| 	{ | 	{ | ||||||
| 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | ||||||
| 		free(gpReqBuf); | 		free(gpReplyBuf); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   return retCode; |   return retCode; | ||||||
| @@ -3784,7 +3784,7 @@ int32_t ipc_SetMasterPassword | |||||||
| 	if(gpReplyBuf) | 	if(gpReplyBuf) | ||||||
| 	{ | 	{ | ||||||
| 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | ||||||
| 		free(gpReqBuf); | 		free(gpReplyBuf); | ||||||
|   } |   } | ||||||
|    |    | ||||||
|   return retCode; |   return retCode; | ||||||
| @@ -3972,7 +3972,7 @@ int ipc_IsSecretPersistent | |||||||
| 	if(gpReplyBuf) | 	if(gpReplyBuf) | ||||||
| 	{ | 	{ | ||||||
| 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | 		memset(gpReplyBuf, 0, MIN_REPLY_BUF_LEN); | ||||||
| 		free(gpReqBuf); | 		free(gpReplyBuf); | ||||||
|   } |   } | ||||||
|  |  | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user