Changeset 4626

Show
Ignore:
Timestamp:
02/14/07 17:47:36 (2 years ago)
Author:
morris
Message:

Plug some more leaks

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • libwired/trunk/libwired/p7/wi-p7-crypto.c

    r4623 r4626  
    200200        wi_p7_rsa_t             *p7_rsa = instance; 
    201201         
    202         return wi_string_init_with_format(wi_string_alloc(), WI_STR("<%@ %p>{key = %p, bits = %u}"), 
     202        return wi_string_with_format(WI_STR("<%@ %p>{key = %p, bits = %u}"), 
    203203        wi_runtime_class_name(p7_rsa), 
    204204                p7_rsa, 
     
    349349        } 
    350350         
    351         p7_cipher->key_data = wi_data_init_with_bytes(wi_data_alloc(), key_buffer, key_length); 
    352         p7_cipher->iv_data = wi_data_init_with_bytes(wi_data_alloc(), iv_buffer, iv_length); 
     351        p7_cipher->key_data = wi_data_init_with_bytes_no_copy(wi_data_alloc(), key_buffer, key_length, true); 
     352        p7_cipher->iv_data = wi_data_init_with_bytes_no_copy(wi_data_alloc(), iv_buffer, iv_length, true); 
    353353         
    354354        EVP_PKEY_free(private_cipher); 
    355         wi_free(key_buffer); 
    356         wi_free(iv_buffer); 
    357355 
    358356        return p7_cipher; 
     
    417415        wi_p7_cipher_t          *p7_cipher = instance; 
    418416         
    419         return wi_string_init_with_format(wi_string_alloc(), WI_STR("<%@ %p>{bits = %u}"), 
     417        return wi_string_with_format(WI_STR("<%@ %p>{bits = %u}"), 
    420418        wi_runtime_class_name(p7_cipher), 
    421419                p7_cipher, 
  • libwired/trunk/libwired/p7/wi-p7-socket.c

    r4623 r4626  
    4949#include <errno.h> 
    5050 
    51 #include <openssl/err.h> 
    52 #include <openssl/evp.h> 
    53 #include <openssl/x509.h> 
    54  
    5551#include <zlib.h> 
    5652 
     
    182178        wi_p7_socket_t          *p7_socket = instance; 
    183179 
    184         return wi_string_init_with_format(wi_string_alloc(), WI_STR("<%@ %p>{options = 0x%X, socket = %@}"), 
     180        return wi_string_with_format(WI_STR("<%@ %p>{options = 0x%X, socket = %@}"), 
    185181                wi_runtime_class_name(p7_socket), 
    186182                p7_socket,