tls destructor was not called upon main exit

Signed-off-by: Eyal Salomon <esalomon@mellanox.com>
return error upon failure

Signed-off-by: Eyal Salomon <esalomon@mellanox.com>
memclonev copy the min between destination size and source size

Signed-off-by: Eyal Salomon <esalomon@mellanox.com>