Fix a NULL pointer problem that, under some circumstances, could segfault.
authorscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 9 Mar 2010 04:53:52 +0000 (04:53 +0000)
committerscottmk <scottmk@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 9 Mar 2010 04:53:52 +0000 (04:53 +0000)
The get_primitive() function was returning NULL in some cases, and the calling
code didn't check for NULL.

Fix: return "string" as the default datatype.

M    Open-ILS/src/c-apps/oils_cstore.c

git-svn-id: svn://svn.open-ils.org/ILS/trunk@15751 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/c-apps/oils_cstore.c

index 6630b53..2177a0f 100644 (file)
@@ -5979,8 +5979,7 @@ static const char* get_primitive( osrfHash* field ) {
                                MODULENAME,
                                osrfHashGet( field, "name" )
                        );
-               else
-                       s = "string";
+               s = "string";
        }
        return s;
 }