Skip to content

Commit

Permalink
Release 2.20.2
Browse files Browse the repository at this point in the history
- [BUGFIX] Memory leak: free pushed promise when refcnt is zero.
- [BUGFIX] Memory leak in IETF full conn dtor: cleanup closed IDs sets.
  • Loading branch information
Dmitri Tikhonov committed Sep 25, 2020
1 parent 30d0674 commit fcd21c6
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
2020-09-25
- 2.20.2
- [BUGFIX] Memory leak: free pushed promise when refcnt is zero.
- [BUGFIX] Memory leak in IETF full conn dtor: cleanup closed IDs sets.

2020-09-23
- 2.20.1
- [BUGFIX] Typo in new "validate peer addr by DCID" code. It is
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
# The short X.Y version
version = u'2.20'
# The full version, including alpha/beta/rc tags
release = u'2.20.1'
release = u'2.20.2'


# -- General configuration ---------------------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion include/lsquic.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ extern "C" {

#define LSQUIC_MAJOR_VERSION 2
#define LSQUIC_MINOR_VERSION 20
#define LSQUIC_PATCH_VERSION 1
#define LSQUIC_PATCH_VERSION 2

/**
* Engine flags:
Expand Down
2 changes: 2 additions & 0 deletions src/liblsquic/lsquic_full_conn_ietf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2973,6 +2973,8 @@ ietf_full_conn_ci_destroy (struct lsquic_conn *lconn)
if (conn->ifc_pub.u.ietf.promises)
lsquic_hash_destroy(conn->ifc_pub.u.ietf.promises);
}
for (i = 0; i < N_SITS; ++i)
lsquic_set64_cleanup(&conn->ifc_closed_stream_ids[i]);
lsquic_hash_destroy(conn->ifc_pub.all_streams);
EV_LOG_CONN_EVENT(LSQUIC_LOG_CONN_ID, "full connection destroyed");
free(conn->ifc_errmsg);
Expand Down
8 changes: 2 additions & 6 deletions src/liblsquic/lsquic_push_promise.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,13 @@
#ifndef LSQUIC_PUSH_PROMISE_H
#define LSQUIC_PUSH_PROMISE_H 1

struct lsquic_hash_elem;
struct lsquic_stream;


struct push_promise
{
/* A push promise is associated with a single stream, while a stream can
* have several push promises it depends on. These push promises are
* stored on a list. A push promise is destroyed when the dependent
* stream is destroyed. This bounds the amount of time when DUPLICATE_PUSH
* frames can be sent out.
* stream is destroyed.
*/
SLIST_ENTRY(push_promise) pp_next;
/* Push promises are stored a hash and can be searched by ID */
Expand Down Expand Up @@ -62,7 +58,7 @@ struct push_promise
LSQ_DEBUG("destroy push promise %"PRIu64, (promise_)->pp_id); \
if ((promise_)->pp_hash_id.qhe_flags & QHE_HASHED) \
lsquic_hash_erase(all_promises_, &(promise_)->pp_hash_id); \
free(promise); \
free(promise_); \
} \
} \
else \
Expand Down

0 comments on commit fcd21c6

Please sign in to comment.