Ticket #20715: 0001-Fix-memory-leak-in-signed_descriptor_move.patch

File 0001-Fix-memory-leak-in-signed_descriptor_move.patch, 727 bytes (added by neel, 3 years ago)

Patch to fix signed_descriptor_move() memory leak

  • src/or/routerlist.c

    From 9e4f476fde5bca645612928edbef3c5fb4635788 Mon Sep 17 00:00:00 2001
    From: Neel Chauhan <Neel Chauhan>
    Date: Tue, 29 Nov 2016 12:10:40 -0500
    Subject: [PATCH] Fix memory leak in signed_descriptor_move()
    
    ---
     src/or/routerlist.c | 1 +
     1 file changed, 1 insertion(+)
    
    diff --git a/src/or/routerlist.c b/src/or/routerlist.c
    index c99d22e..3bb1836 100644
    a b signed_descriptor_move(signed_descriptor_t *dest, 
    32433243                       signed_descriptor_t *src)
    32443244{
    32453245  tor_assert(dest != src);
     3246  signed_descriptor_free(dest);
    32463247  memcpy(dest, src, sizeof(signed_descriptor_t));
    32473248  src->signed_descriptor_body = NULL;
    32483249  src->signing_key_cert = NULL;