From f042e44d18c481e7e2ca37895afbd6ecf42061a3 Mon Sep 17 00:00:00 2001 From: Jiří Pinkava <j-pi@seznam.cz> Date: Thu, 12 Mar 2015 11:23:16 +0100 Subject: runtime: do not return buffer created on stact #722 --- gnuradio-runtime/lib/vmcircbuf.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'gnuradio-runtime/lib/vmcircbuf.cc') diff --git a/gnuradio-runtime/lib/vmcircbuf.cc b/gnuradio-runtime/lib/vmcircbuf.cc index d17ed72c43..05f08ceed4 100644 --- a/gnuradio-runtime/lib/vmcircbuf.cc +++ b/gnuradio-runtime/lib/vmcircbuf.cc @@ -68,9 +68,8 @@ namespace gr { std::vector<gr::vmcircbuf_factory *> all = all_factories (); - const char *name = gr::vmcircbuf_prefs::get(FACTORY_PREF_KEY); - - if(name) { + char name[1024]; + if (gr::vmcircbuf_prefs::get(FACTORY_PREF_KEY, name, sizeof(name)) >= 0) { for(unsigned int i = 0; i < all.size (); i++) { if(strncmp(name, all[i]->name(), strlen(all[i]->name())) == 0) { s_default_factory = all[i]; -- cgit v1.2.3