]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Merge branch 'dev/all-merged/master' of git://github.com/episource/unbound into episo...
authorW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 18 Jun 2019 15:07:57 +0000 (17:07 +0200)
committerW.C.A. Wijngaards <wouter@nlnetlabs.nl>
Tue, 18 Jun 2019 15:07:57 +0000 (17:07 +0200)
1  2 
doc/unbound.conf.5.in
pythonmod/interface.i
pythonmod/pythonmod.c
util/config_file.c
util/config_file.h
util/configparser.c
util/configparser.y

Simple merge
Simple merge
index 9009a28daaa0644349fe3fb4002bcf789f7bee15,b19c97c55ce8c7984ce357d281bff6c3b87aba0a..e87ced13c8d9af0936e774ba37981d06fe62f8ac
@@@ -246,10 -255,9 +255,11 @@@ int pythonmod_init(struct module_env* e
     FILE* script_py = NULL;
     PyObject* py_init_arg, *res;
     PyGILState_STATE gil;
-    int init_standard = 1;
+    int init_standard = 1, i = 0;
 -   
 +#if PY_MAJOR_VERSION < 3
 +   PyObject* PyFileObject = NULL;
 +#endif
+    struct config_strlist* cfg_item = env->cfg->python_script;
  
     struct pythonmod_env* pe = (struct pythonmod_env*)calloc(1, sizeof(struct pythonmod_env));
     if (!pe)
        (void)PyParser_SimpleParseFile(script_py, pe->fname, Py_file_input);
        log_py_err();
        PyGILState_Release(gil);
+       fclose(script_py);
        return 0;
     }
 +#if PY_MAJOR_VERSION < 3
 +   Py_XDECREF(PyFileObject);
 +#else
     fclose(script_py);
 +#endif
  
     if ((pe->func_init = PyDict_GetItemString(pe->dict, "init_standard")) == NULL)
     {
Simple merge
Simple merge
index 1dc53f7b24d7bc9077bb2e02a76c221dae48e7b1,2b5ed3f682c4a61d47b78f3022d2a9ad413c0c42..f85f3b3b42473e26539ce8e8cfe29cf7e7d1b1b6
@@@ -5745,21 -5709,21 +5745,21 @@@ yyreduce
      { 
                OUTYY(("\nP(python:)\n")); 
        }
 -#line 5713 "util/configparser.c" /* yacc.c:1648  */
 +#line 5749 "util/configparser.c" /* yacc.c:1648  */
      break;
  
 -  case 508:
 -#line 2721 "./util/configparser.y" /* yacc.c:1648  */
 +  case 509:
 +#line 2739 "./util/configparser.y" /* yacc.c:1648  */
      {
                OUTYY(("P(python-script:%s)\n", (yyvsp[0].str)));
-               free(cfg_parser->cfg->python_script);
-               cfg_parser->cfg->python_script = (yyvsp[0].str);
+               if(!cfg_strlist_append_ex(&cfg_parser->cfg->python_script, (yyvsp[0].str)))
+                       yyerror("out of memory");
        }
 -#line 5723 "util/configparser.c" /* yacc.c:1648  */
 +#line 5759 "util/configparser.c" /* yacc.c:1648  */
      break;
  
 -  case 509:
 -#line 2727 "./util/configparser.y" /* yacc.c:1648  */
 +  case 510:
 +#line 2745 "./util/configparser.y" /* yacc.c:1648  */
      {
                OUTYY(("P(disable_dnssec_lame_check:%s)\n", (yyvsp[0].str)));
                if (strcmp((yyvsp[0].str), "yes") != 0 && strcmp((yyvsp[0].str), "no") != 0)
Simple merge