if (lastdbval != &dbroot) {
if (lastdbval != dbroot) {
int fetchsample(struct GoogleCache *gc, const char *daystr, struct StringStack *terms, double *val, const char *gkey){  struct StringStack *normed;  const char *ckey;  struct DataBlock *dbroot;  struct DataBlock *dblastkey;  struct DataBlock *db;  struct DataBlock *dbckey;  dbroot = stringToDataBlockPtr(ROOTSYM); /* FSA01 */  normed = stringstackClone(terms);                    /* FSA02 */  normalizeSearchTerms(normed);  ckey = makeCacheKey(daystr, normed);  dbckey = stringToDataBlockPtr(ckey);      /* FSA03 */  db = cldbfetch(gc->samp, dbckey);  if (db) {    assert(db->size == sizeof(struct GCSample));    *val = convertCacheVal(*db);    stringstackFree(normed);                       /* FSF02:1/2 */    datablockFreePtr(db);    datablockFreePtr(dbroot);                /* FSF01:1/2 */    datablockFreePtr(dbckey);                /* FSF03:1/2 */    return 1;  } else {    double pgc;    struct DataBlock *newentry, *lastdbval;    pgc = getPageCount(terms, gkey);    if (pgc < 0) {      printf("Error contacting Google, aborting...\n");      exit(1);    }    *val = pgc;    dblastkey = stringToDataBlockPtr(makeCacheKey(ROOTSYM, normed));    lastdbval = cldbfetch(gc->samp, dblastkey);    if (lastdbval == NULL)      lastdbval = dbroot;    newentry = makeCacheVal(pgc, lastdbval, makeCacheKey(ROOTSYM, terms));    cldbstore(gc->samp, dbckey, newentry);    cldbstore(gc->samp, dblastkey, dbckey);    stringstackFree(normed);                          /* FSF02:2/2 */    datablockFreePtr(dblastkey);    datablockFreePtr(newentry);    datablockFreePtr(dbroot);                /* FSF01:2/2 */    datablockFreePtr(dbckey);                /* FSF03:2/2 */    if (lastdbval != &dbroot) {      datablockFreePtr(lastdbval);      lastdbval = NULL;    }    return 0;  }}