diff --git a/drivers/rptun/rptun.c b/drivers/rptun/rptun.c index 8bc2acc1d32..a9956494a05 100644 --- a/drivers/rptun/rptun.c +++ b/drivers/rptun/rptun.c @@ -825,6 +825,7 @@ static int rptun_store_open(FAR void *store_, ret = file_read(&store->file, store->buf, len); if (ret < 0) { + kmm_free(store->buf); file_close(&store->file); }