diff options
author | Robin Gareus <robin@gareus.org> | 2014-12-31 03:12:57 +0100 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2014-12-31 03:19:00 +0100 |
commit | f499f4cfd2e98ee67d8267aea76a71bf8f47af68 (patch) | |
tree | 8a88f37280ffe7079c98e58c62e63fa205e36737 /libs/backends/alsa/alsa_audiobackend.h | |
parent | 2c8babf41ea3809720fe99d074a4f74ad84b8271 (diff) |
don't take temporary copy of MIDI sequence
fixes potential boost shared_ptr double free.
Diffstat (limited to 'libs/backends/alsa/alsa_audiobackend.h')
-rw-r--r-- | libs/backends/alsa/alsa_audiobackend.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/backends/alsa/alsa_audiobackend.h b/libs/backends/alsa/alsa_audiobackend.h index f9123875e6..3daae85b21 100644 --- a/libs/backends/alsa/alsa_audiobackend.h +++ b/libs/backends/alsa/alsa_audiobackend.h @@ -142,7 +142,7 @@ class AlsaMidiPort : public AlsaPort { DataType type () const { return DataType::MIDI; }; void* get_buffer (pframes_t nframes); - const AlsaMidiBuffer const_buffer () const { return _buffer[_bufperiod]; } + const AlsaMidiBuffer * const_buffer () const { return & _buffer[_bufperiod]; } void next_period() { if (_n_periods > 1) { get_buffer(0); _bufperiod = (_bufperiod + 1) % _n_periods; } } void set_n_periods(int n) { if (n > 0 && n < 3) { _n_periods = n; } } |