]> sigrok.org Git - libsigrok.git/blobdiff - tests/input_binary.c
kingst-la2016: fix segfault that often occurs when a capture is aborted
[libsigrok.git] / tests / input_binary.c
index 403f7307a2de33936cc3faa251b8dba3f68476a2..bef604172e06440038123f4ead8934b13c184e4b 100644 (file)
  * GNU General Public License for more details.
  *
  * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
  */
 
+#include <config.h>
 #include <check.h>
 #include <glib/gstdio.h>
-#include "../include/libsigrok/libsigrok.h"
+#include <libsigrok/libsigrok.h>
 #include "lib.h"
 
 #define BUFSIZE (1000 * 1000)
@@ -208,7 +208,7 @@ static void check_buf(GHashTable *options, const uint8_t *buf, int check,
 
        sdi = sr_input_dev_inst_get(in);
 
-       sr_session_new(&session);
+       sr_session_new(srtest_ctx, &session);
        sr_session_datafeed_callback_add(session, datafeed_in, NULL);
        sr_session_dev_add(session, sdi);