Message ID | 20180115204233.11758-1-aconole@bytheb.org |
---|---|
State | Accepted |
Delegated to: | Aaron Conole |
Headers | show |
diff --git a/cxx-lib/src/asn-buf.cpp b/cxx-lib/src/asn-buf.cpp index c599182..2591bec 100644 --- a/cxx-lib/src/asn-buf.cpp +++ b/cxx-lib/src/asn-buf.cpp @@ -208,7 +208,7 @@ char * AsnBuf::GetSeg(long segLen) const try { GetSeg(seg, segLen); - } catch (BufferException) { + } catch (BufferException &) { delete [] seg; seg = NULL; }
The BufferException object is quite large (>512 bytes), which incurrs a performance impact. Convert the pass-by-value to a pass-by-reference. Fixes: ea172d558054 ("cxx-lib/src/asn-buf: make GetSeg non-throwing.") Signed-off-by: Aaron Conole <aconole@bytheb.org> --- cxx-lib/src/asn-buf.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)